Repository navigation
Record PostgreSQL extensions; restore-test pgvector sets in pgvector's image; release 0.3.0 - #5
Merged
Merged
Conversation
…tor's image Postgres manifests now list each database's extensions. A restore checks the destination has them all before changing anything, instead of failing part-way through pg_restore; restore-test reports a missing extension as an error; and scripts/restore-test.sh picks pgvector/pgvector:pg<major> as the scratch image for sets that use vector, since the stock image only has contrib extensions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sets from 0.2.x and earlier have no extensions in their inventory. They restore and restore-test as before: there's no extension preflight or comparison, and the stock scratch image is used. Add unit tests for that, and say so in the restore docs. Checked end to end: sets made by the published 0.2.0 image, one with pg_trgm in use, pass scripts/restore-test.sh with this code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ubuntu-latest is now ubuntu-26.04, whose kernel is in the 6.19 to 7.0.13 range that MongoDB 8.x refuses to start on (SERVER-121912: its TCMalloc breaks with those kernels' rseq changes; 7.0.14 and 7.1 restore the old behaviour). Pin the integration job to ubuntu-24.04 until the newer runner has a fixed kernel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ubuntu-24.04 runner now has the same 7.0.0 kernel as ubuntu-26.04, so MongoDB 8.x refuses to start there too. ubuntu-22.04 still has 6.8. Its runners are being retired by April 2027, so this is a stopgap until ubuntu-latest has kernel 7.0.14+ or 7.1+. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
extensions({name: version}, frompg_extension).dbbackup inspectshows them, and--format envaddsDBB_EXTENSIONS.dbbackup restorerefuses a destination that lacks any extension the restored databases use, naming them, before changing anything. Previouslypg_restorewould fail part-way through, onCREATE EXTENSIONand then on everything depending on it.restore-testreports a missing extension as an error, like a missing table.scripts/restore-test.shusespgvector/pgvector:pg<major>as the scratch server for sets that usevector;SCRATCH_IMAGE_POSTGRESstill overrides it. The summary table's scratch column is wider to fit the longer image name.docs/restore.mdupdated, including what to do for other non-stock extensions, such as PostGIS.pyproject.toml,__version__, the kustomization's image tag and the image references indocs/restore.md.Why
The new memlord target is PostgreSQL with pgvector. Restore-testing it in stock
postgres:<major>would always fail, and a real recovery onto a server without pgvector should say so up front.Notes for review
ubuntu-22.04. MongoDB 8.x refuses to start on Linux 6.19 to 7.0.13 (SERVER-121912; 7.0.14 and 7.1 fix it). Theubuntu-24.04andubuntu-26.04runners both have 7.0.0 now;ubuntu-22.04still has 6.8. It's a stopgap, since 22.04's runners are retired by April 2027. The workflow comment says when to go back toubuntu-latest.plpgsqlis recorded too. It's harmless, since every server has it.pg_trgm(contrib, so the stock image has it) with a GIN index, so an extension is backed up and restored end to end.Testing
ghcr.io/arkane-systems/db-backup:0.2.0image (noextensionsrecorded;app1usespg_trgm) passscripts/restore-test.sh --build: all 4 targets.make lint,make test(98 passed),make integration(17 passed) andmake restore-test-check(all 4 targets passed), all on a fresh stack.pgvector/pgvector:pg18source on port 5433, with avector(3)column and an HNSW index:pgvector/pgvector:pg18and passed.SCRATCH_IMAGE_POSTGRES=postgres:18forced, it stopped before restoring with "scratch-postgres doesn't have extension(s) the backup uses: vector (install them first)".🤖 Generated with Claude Code