Repository navigation
Darling: the PostgreSQL store's minimum version is 16, stated once in the README (#4982) - #4988
Merged
Merged
Conversation
… the README (#4982) The README gave 16 (recommended) in Prerequisites and 15+ in the systemd section, and five code comments said the product minimum is 17. Nothing in the code checks the store's version at startup, so the minimum comes from what the store has to run: any_value() in the analysis reads needs PostgreSQL 16, and TimescaleDB 2.29 and later (the bundle pins 2.30.1) supports PostgreSQL 16 to 18 only. Nothing unguarded needs 17: pg_stat_checkpointer is read on 17 and later with a pg_stat_bgwriter fallback below. Prerequisites now states the minimum once, the systemd section points to it, and the comments say 16.
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.
Closes #4982.
Why
Three places gave three different minimum PostgreSQL versions for the store:
Darling/README.md, Prerequisites, said PostgreSQL 16 or newer is "recommended".Darling/README.md, the systemd section, said PostgreSQL 15+.Nothing in the code checks the store's version when the service starts, so there was no check to read the number from. I took the minimum from what the store has to run. It is 16.
Evidence (file:line at the base commit):
NULLS NOT DISTINCTin two migration rungs that always run (V143 and V145)PgMigrations.cs:2349,:2527any_value()in the analysis reads against the store, with no version checkPgFactCollector.QueryPerf.cs:389,:429;PgDrillDownCollector.Queries.cs:733-734,:765-766Darling/tools/fetch-pg-runtime.ps1:108; TimescaleDB 2.29.0 release notesQueryStoreIntervalWideBrinIndex.cs:82On 15 the plan-regression read fails and is reported as a collection failure (
PgFactCollector.QueryPerf.cs:660-665), so that server loses those findings.Nothing that always runs needs 17:
pg_stat_checkpointeris read on 17 and later, with apg_stat_bgwriterread below (StoreSelfMetrics.cs:475,:608,:1264).transaction_timeoutappears only in a comment, as the reason it is not used (PgMigrations.cs:7085).MERGE ... RETURNING,JSON_TABLE,JSON_EXISTS,JSON_QUERY,JSON_VALUE,uuidv7,RETURNING OLD/NEWorpg_maintain.e61c44f59and8d3ae43f3, and Field data confirms the interval-table fix removes the spill, ship it (#3953) #4208 (731512799) copied it into the V143 comment. None of the six comments cites a check or a feature that needs 17.I looked for a version check to raise and found none.
SHOW server_version_numinDarlingStoreUpgrade.cs:5395only compares the running major with the bundled one after a managed upgrade.DarlingStoreHostProfile.cs:422only reports the version. The probe inDarlingServerConnector.csis for monitored targets. So I did not add a check.Checked and left alone:
docs/postgres-first-target-runbook.mdsays PostgreSQL 13+ and 14+. Those are floors for a monitored PostgreSQL target, not for the store.HypotheticalIndexExperiment.MinimumPostgresMajorForGenericPlan = 16is also a monitored-target floor.Darling/compose/docker-compose.ymluses a PostgreSQL 17 image, which meets the minimum.darling.sample.jsonmake no claim about the store's minimum. The sample only names the bundled PostgreSQL 18.What changes
Darling/README.md, Prerequisites (line 40): states the minimum once ("the minimum is PostgreSQL 16, and the service is developed and validated against PostgreSQL 18") and breaks the long sentence into short ones. The text about the login, the TimescaleDB background workers andrandom_page_costis the same apart from those breaks.Darling/README.md, systemd section (line 177): "PostgreSQL 15+" becomes a pointer to Prerequisites.PgMigrations.cs,PgFactCollector.cs,PgFactCollector.QueryPerf.cs,PgDrillDownCollector.cs, and one comment each inDarlingAnalysisPipelineTests.csandPgFactCollectorTests.cs. No assertion changes.Test plan
Darling/Darling.Tests/Darling.Tests.csproj -c Debug: 0 Warning(s), 0 Error(s).DarlingCollectorToggleVerbTests,RepoFileAdoptionTests,DocCommentHygieneTests,DarlingAnalysisPipelineTests,PgFactCollectorTests: Total 139, Failed 0, Skipped 4 (live PostgreSQL tests that skip when no connection string is set; none was set).ReadmeDerivedCountPinTestsandDarlingCliCommandsTests(they read the README): Total 25, Failed 0.Notes
releases/tag/2.29.0), fetched during this work.CHANGELOG
No entry in this PR; the release owner adds it under [Unreleased].
Proposed entry: