The two scenarios that make pgvector ops different
- Schema migration on a table with a vector column. Postgres handles this fine — the same migration tools (Alembic, dbmate, sqlx) work. Just be aware that adding a vector(N) NOT NULL column to a populated table requires a backfill plan.
- Re-embedding when you change models. The dimension changes, so you cannot ALTER COLUMN — you add a new column or table.
The zero-downtime re-embed pattern
ALTER TABLE chunks ADD COLUMN embedding_v2 vector(1024) NULL;- Backfill in batches: read text, embed, update embedding_v2 WHERE embedding_v2 IS NULL.
- Build the v2 index.
- Switch reads to embedding_v2 in code.
- Drop embedding (the v1 column) one week later.
Backups
pg_dump and PITR work as usual. Vector columns serialize as text by default, which is verbose; for very large tables prefer base backups + WAL archiving over logical dumps.