Add an opt-in PostgreSQL 18 target to the verification rig - #2657
Merged
Conversation
Version drift is silent from one server. 17 gutted pg_stat_bgwriter and 18 removed pg_stat_io's op_bytes, and in both cases a collector that guards the difference correctly and a read that quietly returns NULL look identical unless two majors are present at once. #2653 and #2655 were both found and verified that way, and the rig could not do it -- PG_MAJOR replaces the target rather than adding one. `docker compose --profile multiversion up -d` adds a plain PostgreSQL 18 on 55418, alongside the existing 17. Opt-in so the default stays a two-container rig. Deliberately the plain image, not the extension build: the PGDG extension packages do not track a new major immediately, so pinning to them would make the whole rig fail to build on the day a major ships -- exactly when this target is most useful. It exercises the core catalog views, which is where version drift lives. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Reviewed. This is a self-contained addition to the local dev verification rig (docker-compose.yml + README) — no T-SQL, no Lite/Darling application code touched, so the parity concerns and T-SQL style rules don't apply here. Checked:
No correctness, security, or parity issues found. Nothing blocking. |
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.
Follow-on from #2653 and #2655, which were both found and verified by running two PostgreSQL majors at once.
Why
Version drift in the catalog views is silent from a single server. 17 gutted
pg_stat_bgwriter(fivecolumns to
pg_stat_checkpointer,buffers_backenddeleted outright); 18 removedpg_stat_io'sop_bytesand replaced it with measuredread_bytes/write_bytes/extend_bytes. In both cases acollector that guards the difference correctly and a read that quietly returns NULL look identical from
one target.
The rig could not do this:
PG_MAJORreplaces the target rather than adding one, so you can have 17 or 18,never both.
What
docker compose --profile multiversion up -d # adds a plain PostgreSQL 18 on 55418Opt-in via a compose profile, so the default
up -dstays the two-container rig it is today.Registering both targets in one
darling.jsonturns the difference into an observable — which is exactlyhow the two issues above got verified:
postgres_major_version17 and 18 side by sidepg_io_statssplits cleanly: 17's rows carryop_bytesand noread_bytes, 18's the reverseget_pg_io_statsanswersestimated_from_block_sizefor one andmeasuredfor the otherIt also quantifies what reasoning gets wrong. 18's vectored reads mean one entry in
readscan coverseveral blocks, so the pre-18
reads × block_sizeestimate undercounts — measured on this rig at 10× to16×, not the few percent it sounds like in the abstract.
The one design choice worth stating
The 18 target is the plain image, not the extension build. PGDG extension packages do not track a new
major immediately, and pinning this service to them would make the whole rig fail to build on the day a
major ships — precisely when a newest-major target is most useful. It exercises the core catalog views,
which is where version drift lives; the extension-backed collectors stay on the 17 target.