M12.4: admit and replay durable boundary-accounting upgrades
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m15s
Foundation / checks (tsan) (push) Successful in 23m3s
Foundation / checks (postgres) (push) Successful in 51m33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 55m18s

This commit is contained in:
dingo
2026-10-18 08:13:36 -04:00
parent 2416735e2b
commit 1b5c0cdf7c
21 changed files with 812 additions and 98 deletions
+12 -3
View File
@@ -121,6 +121,7 @@ SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_namespace WHERE nspname='evolution')
SELECT :'history_v42' || ',43:' || :'migration_sha_43' AS history_v43 \gset
SELECT :'history_v43' || ',44:' || :'migration_sha_44' AS history_v44 \gset
SELECT :'history_v44' || ',45:' || :'migration_sha_45' AS history_v45 \gset
SELECT :'history_v45' || ',46:' || :'migration_sha_46' AS history_v46 \gset
SELECT :'history' = :'history_v22' AS at_v22,
:'history' = :'history_v23' AS at_v23,
:'history' = :'history_v24' AS at_v24,
@@ -144,8 +145,10 @@ SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_namespace WHERE nspname='evolution')
:'history' = :'history_v42' AS at_v42,
:'history' = :'history_v43' AS at_v43,
:'history' = :'history_v44' AS at_v44,
:'history' = :'history_v45' AS at_v45 \gset
\if :at_v45
:'history' = :'history_v45' AS at_v45,
:'history' = :'history_v46' AS at_v46 \gset
\if :at_v46
\elif :at_v45
\elif :at_v44
\elif :at_v43
\elif :at_v42
@@ -529,7 +532,8 @@ SELECT coalesce(max(version), 0) = 24 AS at_v24,
coalesce(max(version), 0) = 42 AS at_v42,
coalesce(max(version), 0) = 43 AS at_v43,
coalesce(max(version), 0) = 44 AS at_v44,
coalesce(max(version), 0) = 45 AS at_v45
coalesce(max(version), 0) = 45 AS at_v45,
coalesce(max(version), 0) = 46 AS at_v46
FROM evolution.schema_migrations \gset
\if :at_v24
\ir 0025_cellular_v2_bundle.sql
@@ -743,6 +747,7 @@ SELECT coalesce(max(version), 0) = 24 AS at_v24,
\elif :at_v43
\elif :at_v44
\elif :at_v45
\elif :at_v46
\else
\echo 'Unknown or changed migration history after v43'
DO $$ BEGIN RAISE EXCEPTION 'unknown or changed migration history'; END $$;
@@ -755,6 +760,10 @@ SELECT coalesce(max(version), 0) = 44 AS needs_v45 FROM evolution.schema_migrati
\if :needs_v45
\ir 0045_owned_population_intervals.sql
\endif
SELECT coalesce(max(version), 0) = 45 AS needs_v46 FROM evolution.schema_migrations \gset
\if :needs_v46
\ir 0046_boundary_accounting_upgrade.sql
\endif
-- Effective-privilege audit on every run, including no-ops (ADR-0060). Attributes
-- alone are insufficient: predefined roles such as pg_write_all_data, PUBLIC
-- grants or SET-able memberships would bypass the fenced functions. Checks the