A DocumentRegistry in a PostgreSQL table, so that RAG.sync survives a restart: the next sync finds the versions the last one registered, re-embeds only what changed, and deletes what the source dropped while the process was down.
One row per document: its id, version (content_hash, version_timestamp, etag) and the source that owns it. Several pipelines can share one table only if their document ids do not collide; give each its own table otherwise.
Build it over a pool the application already has with PgDocumentRegistry.fromDataSource - the same one a PgVectorStore or PgSearchIndex uses (#2300) - or let it open its own with PgDocumentRegistry.apply. close closes only a pool the registry opened. Calls are blocking JDBC.