Skip to content

FileLoader with Postgres (pgvector) does not remove old embeddings — documents table grows indefinitely with each new upload #5070

@jeme95

Description

@jeme95

Describe the bug

When using Flowise in a Docker environment with a Document Store and a FileLoader, connected to Postgres with pgvector, embeddings from old files remain in the database even after new files are uploaded.
Flowise always appends new embeddings to the documents table without removing older entries that are no longer needed, causing the table to grow indefinitely. Flowise becomes noticeably slower — both the "Process" step and the "Upsert" step take significantly longer, making the system sluggish over time

To Reproduce

Steps to Reproduce:

  1. Run Flowise in a Docker container with a Postgres (pgvector) database connected as Document Store.

  2. Create a FileLoader node and upload one or more files.

  3. Check the documents table in the Postgres database — embeddings are stored as expected.

  4. Remove the old files from the FileLoader input and upload completely new files.

  5. Check the documents table again — the old embeddings are still present, and new embeddings have been appended instead of removing outdated ones.

Expected behavior

old embeddings should be deleted from the documents table, because they are no longer part of the active Document Store

Screenshots

Image Image

Flow

No response

Use Method

None

Flowise Version

3.0.5

Operating System

Windows

Browser

Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions