Add pgvector extension to all image variants#1
Conversation
Build pgvector v0.8.0 from source in alpine and master templates. Install via apt package (postgresql-$PG_MAJOR-pgvector) in debian template. Verify CREATE EXTENSION vector in regression checks.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b6459c9d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| && make install \ | ||
| \ | ||
| # build pgvector | ||
| && git clone --branch "v${PGVECTOR_VERSION}" --depth 1 https://github.com/pgvector/pgvector.git /usr/src/pgvector \ |
There was a problem hiding this comment.
Pin pgvector checkout to an immutable revision
The new git clone --branch "v${PGVECTOR_VERSION}" step fetches pgvector by a mutable tag name rather than an immutable commit, so a tag move or retag upstream can silently change what gets built for the same Dockerfile and produce non-reproducible (or unexpectedly broken) images. This is especially risky here because the template fans out to multiple published variants; prefer cloning a specific commit SHA (and optionally verifying it) to keep builds deterministic.
Useful? React with 👍 / 👎.
Summary
postgresql-$PG_MAJOR-pgvector) in debian templateCREATE EXTENSION vectorto regression checks in all templatesapply-templates.shContext
The Closient database uses pgvector for embedding storage (
search_search_embeddingtable). Without pgvector in the dev Docker image,dataset:restoresilently skips the vector tables, causing missing functionality locally.Test plan
17-3.5-alpinelocally — pgvector compiles andCREATE EXTENSION vectorpasses regression checkdataset:restorecompletes with zero pg_restore errors (previously had 10 errors)