Skip to content

knowledge-pgvector: a changed fingerprint builds a new generation and switches to it #37101

Backlog

Description

@os-bob

maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby

Filing gate: ③ maintainer-directed (topic child). Source: topic #37000 (phase 2 row 8, its generation half); maintainer 2026-11-24 「用fable评审,并分拆第二阶段的任务」. Reviewed by an independent Fable pass before filing.
Grading: area:ai · Feature · p2 (topic) · reach: PostgreSQL deployments that change embedding model or split settings · evidence: read.

维护者速读

  • 做什么:换了嵌入模型或切分设置后,pgvector 自动建一套新索引;建好后切过去,旧的分批删掉。新旧两套不混用,因为不同模型的向量没法比较。
  • 要知道的:建新索引期间检索返回「重建中」,不会返回错的结果。
  • 需要你做的:无。

What

  1. When knowledge-pgvector: an open vector store on PostgreSQL — tables, exact search, listing, chunks #37100 marks a source as needing a rebuild, the build (service-knowledge: a source that was never built gets built, and an operator can start a rebuild #37099's trigger) writes into a new generation; event-sync writes during the build go to the new generation only.
  2. When the walk ends: service-knowledge: adapters list their documents; a complete reindex skips unchanged documents and purges the ones its source no longer has; one contract test suite #37096's purge reconciles once, the new generation becomes active, the old one is deleted in batches.
  3. One builder at a time per source (PostgreSQL advisory lock); a crashed build is resumable or restartable (state which).
  4. Search during the build answers the "rebuilding" error.

Acceptance

  • Same dimension, model changed → new generation built, old one takes no part in search, then deleted.
  • Writes during the build are present after the switch.
  • Two concurrent build attempts → one builds.
  • Container run per AGENTS.md, on CI PostgreSQL with pgvector.

Out of scope

Blocked-by: #37100, #37099.
Parent: #37000. Reader: domain:server lane (packages/plugins/knowledge-*).
Dedupe: knowledge generation fingerprint 12 (open: #37000, #37001, a seat post).

Activity

  1. added theissue type on Nov 24, 2026
  2. added
    priority:p2
    on Nov 24, 2026
  3. added
    area:ai
    on Nov 24, 2026
  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: first touch 2026-11-24T20:36Z

  5. added
    domain:server
    pm:blocked
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:serverpm:blockedpriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions