Backup and restore
pg_dump carries the durable control tables (registry, jobs, jobs_dead, migrations) and their identity sequences. Generated triggers dump as ordinary database objects. A chunked destination, its identity sequence, join view, ownership-marker comments, RLS policy and triggers dump normally.
Caches rebuilt after restore:
- BM25 corpus statistics (
lexical_stats,lexical_df): the worker rebuilds them at its first wake; searches usets_rank_cduntil then postvec.models(discovery cache)- the worker heartbeat
Post-restore procedure
- Install the matching postvec and pgvector files for that major.
- Restore cluster configuration (
99-postvec.confor its equivalent) and restart so the launcher and workers start. CLI: backup (CLI). - On managed PostgreSQL, restore the postvec-server
managedentry for each database: the DSN, the password file and thesyncsetting. Managed hosts load no.so, so postvec-server holds the worker, the model fleet and the heartbeat the restored cluster reads. SELECT postvec.refresh_models();- Confirm queues and any open migration before reopening writes.
Restored queued and dead chunk work resumes against the restored chunk identities. Destination sequences are therefore part of the dump.
The restored cluster must load a version-compatible postvec.so. Triggers cannot run when the library is missing.
Logical replication
Statement triggers fire on the publisher. Subscriber-applied changes skip them. Run postvec on the publisher, or use trigger_mode => 'row' and give the subscriber its own worker and models if it should embed independently.
Configuration constraint
postvec.database must match the restored databases
Missing databases cause workers to repeatedly fail during connection. The list must be edited, or postvec uninstalled, followed by a restart before the cluster is opened for application traffic.
On a managed host the equivalent is the managed entry: the DSN, the password file and the sync flag. The server config sits outside the dump, so restore it separately and confirm the sync worker reconnects after the restore.