release: prepare 2.0 stamp - #200
Draft
NikolayS wants to merge 6 commits into
Draft
Conversation
This was referenced Jul 28, 2026
Run the installer replay and ash.config normalization in one migration-owned transaction so no failure can publish the 2.0 stamp on an unconverged schema. Cover the exact custom-trigger repro, a late dependent-view failure, and same-session installer retry ownership from immutable v1.5. Correct the 2.0 reader provenance notes to distinguish aggregate readers from raw-only samples() and presentation-only chart(). Refs #202
Run the issue #202 fixture in a generated database so prior pg_cron workers in the full hosted workflow cannot hold migration locks. Drop the owned database on every exit.
Build the immutable v1.5 chain once, then clone it as a PostgreSQL template for each issue #202 failure case. This preserves exact preconditions while avoiding three full historical installs per CI job.
Prove the transaction-local marker clears and direct installer ownership returns in one deterministic psql process, then force a late installer error and require exact v1.5 state/schema rollback. This retains the discriminator without terminal-dependent CI behavior.
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.
Draft release stamp — do not merge or tag
This prepares the final pg_ash 2.0 payload identity. It intentionally does not tag, merge, publish a release, or dispatch the authoritative pre-tag suite. Those actions remain blocked on the owner-reviewed visual harness in #178 and a subsequent clean whole-suite run from the exact candidate commit.
Final identity follows the repository's two-part policy:
2.0v2.02.0.0/v2.0.0What changes
ash.config.versionsites and the installer header as exactly2.0.sql/migrations/ash-1.5-to-2.0.sql, which remains provisional until the stable tag.ash.confignormalization one migration-owned transaction, fixing release blocker 1.5-to-2.0 migration can stamp 2.0 before config normalization fails #202: no failed upgrade can publish2.0while physically unconverged.DROP RESTRICTfailure, and same-client transaction-marker rollback and direct-installer ownership.samples()is raw-only;chart()is presentation-only and emits its hour-grain planning notice.Promotion note
At base
87c22a3608cbcfeb422ae2ff15425bd462fbb990,devel/sql/contains only its README: there is no development installer or migration to copy. The post-beta candidate had already accumulated in the released paths before #179's policy landed. This PR therefore performs the honest in-place finalization of that candidate. The five scripts declared immutable bydocs/RELEASE_PROCESS.mdremain unchanged; the current 1.5-to-2.0 migration is explicitly provisional untilv2.0.Adversarial release blocker #202
Red
PostgreSQL 17.10, using
git archive v1.5 -- sqland the real archived v1.0→v1.5 chain:The tuple is
ash.config.version | ash.status() version | num_partitions attnum; fresh 2.0 hasattnum=3.Fix and rationale
sql/migrations/ash-1.5-to-2.0.sqlnow begins one transaction before including the installer. A transaction-local internal setting tellssql/ash-install.sqlto suppress only its own boundaries; normalization then completes before the migration's sole finalCOMMIT. Direct installer invocation still owns its transaction and still commits a caller's existing outer transaction at its finalCOMMIT.The normalization code already preflights the enumerable unsupported shapes: columns/types/nullability/row count, legacy-name collision, storage/security/replication/table properties, custom column properties, triggers, policies, rules, publications, extended statistics, labels, inheritance, inbound foreign keys, and invalid indexes. Preflight alone cannot prove later DDL or commit success: a permitted dependent view can block
DROP RESTRICT, while replay, event-trigger, concurrent-DDL, role/dependency, permission, cancellation, deadlock/timeout, storage, OOM, or commit failures can occur later. One transaction enforces the invariant for every failure class rather than only the known catalog list.The marker is transaction-local rather than a persistent psql variable. In one deterministic psql process, the regression sets the marker locally, rolls it back, then invokes the installer directly and forces a late failure after the stamp and most DDL. The exact v1.5 state and schema must remain unchanged, proving the marker cleared and direct transaction ownership returned.
Green
Each failure is checked from a fresh connection against both identity surfaces, the physical ordinal, a full before/after
ashschema snapshot, and survival of the blocking customization.Verification
Candidate:
ba96f7858c0827b8afaf031cd3f832de37db256aPayload hashes:
The ten frozen 1.x migration/wrapper hashes remain identical to base. The current-line migration hash changes intentionally for #202.
Real PostgreSQL beta1 → 2.0 rehearsal
Rerun after the atomicity fix in an owned disposable
pg-ash-release-gate:17container on a Docker-assigned localhost port. The tagged beta installer came directly fromv2.0-beta1; upgrade and re-apply used the public root wrapper from candidateba96f78.The final tuple adds
num_partitions attnum=3. The beta reader role was removed before the final schema snapshots after its_admin_funcs()narrowing and dynamic helper access were asserted, so the fresh-final and beta-upgraded snapshots compare semantically without role-specific ACL ordering noise.Hosted checks for exact candidate
ba96f78are green: docs/release guards plus PostgreSQL 14, 15, 16, 17, 18, 19beta2, and the PostgreSQL 17 no-cron matrix. The regression builds immutable v1.5 once in an owned seed database and template-clones an isolated database for each case, avoiding earlier pg_cron workers and repeated historical installs.Remaining owner gates
test.ymlrelease dispatch withrelease_tag=v2.0v2.0Until those are complete, this PR must remain draft and unmerged.