Skip to main content

Routine upgrade

docker compose pull && docker compose down && docker compose up -d
The backend runs database migrations automatically on start. Below, migrations that need extra manual work are listed by version — only do the versions you cross.

v4.1.x → v4.2.x (Qdrant → pgvector)

Across this range, field vectors move from a standalone Qdrant store to pgvector in the main database. Upgrading from v4.1.x to v4.2.x requires:
1

Switch to the pgvector image

The official postgres image lacks the pgvector extension, so you must switch (the extension is installed automatically by the migrations):
docker-compose.yaml
asktable-pg:
  image: pgvector/pgvector:pg17   # was postgres:17
2

Remove Qdrant

Against the latest compose in Docker deployment, remove the asktable_vdb service, the VDB_ADDRESS/VDB_API_KEY env vars, and the qdrant_storage/qdrant_snapshots volumes.
3

Bring it up

docker compose pull && docker compose down && docker compose up -d
Migrations run and the pgvector extension is installed. If the asktable_workbook database is missing, create it per Docker deployment.
4

Rebuild embeddings

Existing data sources have empty vectors — open each data source page and click Rebuild Embedding to backfill.

Collation-version warning

This only happens when you change the PostgreSQL image and the underlying glibc version changes — the signal is a collation version mismatch line in the startup log.
  • Installed the pgvector extension on your existing PostgreSQL yourself, without changing the image → not triggered, skip this section.
  • Switched an old image (e.g. the postgres image from an earlier deployment) to the pgvector image while reusing the old postgres_data volume → triggered, handle it below.
Don’t just refresh the version number. A different glibc version changes text sort order, so old text indexes no longer match the data and queries silently miss rows. You must reindex first, then refresh the version.
docker compose exec asktable-pg psql -U asktable -d asktable -c "REINDEX DATABASE asktable;"
docker compose exec asktable-pg psql -U asktable -d asktable -c "ALTER DATABASE asktable REFRESH COLLATION VERSION;"
docker compose exec asktable-pg psql -U asktable -d postgres -c "ALTER DATABASE template1 REFRESH COLLATION VERSION;"
If Workbook is enabled, do the same two steps for the asktable_workbook database. When the data is disposable, just recreate the volume: docker compose down -v then up again (never in production — it erases all data).