=== Applying patches on top of PostgreSQL commit ID 534db08f972852b77ea5e96e77d5fe45f3d8df93 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Thu Sep 3 11:26:26 UTC 2026 On branch cf/7159 nothing to commit, working tree clean === using 'git am' to apply patch ./v1-0001-Fix-flaky-ORDER-BY-in-foreign_key-reg.patch === Applying: Fix non-deterministic ORDER BY in foreign_key regression test Using index info to reconstruct a base tree... M src/test/regress/expected/foreign_key.out M src/test/regress/sql/foreign_key.sql Falling back to patching base and 3-way merge... Auto-merging src/test/regress/sql/foreign_key.sql CONFLICT (content): Merge conflict in src/test/regress/sql/foreign_key.sql Auto-merging src/test/regress/expected/foreign_key.out CONFLICT (content): Merge conflict in src/test/regress/expected/foreign_key.out error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Fix non-deterministic ORDER BY in foreign_key regression test When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./v1-0001-Fix-flaky-ORDER-BY-in-foreign_key-reg.patch === patching file src/test/regress/expected/foreign_key.out Hunk #1 FAILED at 1936. Hunk #2 FAILED at 1947. Hunk #3 FAILED at 1967. Hunk #4 FAILED at 1984. Hunk #5 FAILED at 2009. Hunk #6 FAILED at 2042. Hunk #7 FAILED at 2056. 7 out of 7 hunks FAILED -- saving rejects to file src/test/regress/expected/foreign_key.out.rej patching file src/test/regress/sql/foreign_key.sql Hunk #1 FAILED at 1449. Hunk #2 FAILED at 1472. Hunk #3 FAILED at 1486. Hunk #4 FAILED at 1505. Hunk #5 FAILED at 1521. 5 out of 5 hunks FAILED -- saving rejects to file src/test/regress/sql/foreign_key.sql.rej Removing src/test/regress/expected/foreign_key.out.rej Removing src/test/regress/sql/foreign_key.sql.rej === using 'git apply' to apply patch ./v1-0001-Fix-flaky-ORDER-BY-in-foreign_key-reg.patch === Applied patch to 'src/test/regress/expected/foreign_key.out' with conflicts. Applied patch to 'src/test/regress/sql/foreign_key.sql' with conflicts. U src/test/regress/expected/foreign_key.out U src/test/regress/sql/foreign_key.sql diff --cc src/test/regress/expected/foreign_key.out index 333994e6505,545481cec21..00000000000 --- a/src/test/regress/expected/foreign_key.out +++ b/src/test/regress/expected/foreign_key.out @@@ -1936,22 -1936,22 +1936,30 @@@ ALTER TABLE fk_partitioned_fk_1 ADD FOR ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_1 FOR VALUES FROM (0,0) TO (1000,1000); -- Child constraint will remain valid. SELECT conname, convalidated, conrelid::regclass FROM pg_constraint ++<<<<<<< ours +WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | convalidated | conrelid ------------------------------+--------------+--------------------- - fk_partitioned_fk_a_b_fkey | f | fk_partitioned_fk fk_partitioned_fk_1_a_b_fkey | t | fk_partitioned_fk_1 + fk_partitioned_fk_a_b_fkey | f | fk_partitioned_fk (2 rows) -- Validate the constraint ALTER TABLE fk_partitioned_fk VALIDATE CONSTRAINT fk_partitioned_fk_a_b_fkey; -- All constraints are now valid. SELECT conname, convalidated, conrelid::regclass FROM pg_constraint ++<<<<<<< ours +WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | convalidated | conrelid ------------------------------+--------------+--------------------- - fk_partitioned_fk_a_b_fkey | t | fk_partitioned_fk fk_partitioned_fk_1_a_b_fkey | t | fk_partitioned_fk_1 + fk_partitioned_fk_a_b_fkey | t | fk_partitioned_fk (2 rows) -- Attaching a child with a NOT VALID constraint. @@@ -1967,7 -1967,7 +1975,11 @@@ TRUNCATE fk_partitioned_fk_2 ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_2 FOR VALUES FROM (1000,1000) TO (2000,2000); -- The child constraint will also be valid. SELECT conname, convalidated FROM pg_constraint ++<<<<<<< ours +WHERE conrelid = 'fk_partitioned_fk_2'::regclass ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid = 'fk_partitioned_fk_2'::regclass ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | convalidated ------------------------------+-------------- fk_partitioned_fk_2_a_b_fkey | t @@@ -1984,14 -1984,14 +1996,18 @@@ ALTER TABLE fk_partitioned_fk_3 ATTACH ALTER TABLE fk_partitioned_fk ATTACH PARTITION fk_partitioned_fk_3 FOR VALUES FROM (2000,2000) TO (3000,3000); -- All constraints are now valid. SELECT conname, convalidated, conrelid::regclass FROM pg_constraint ++<<<<<<< ours +WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | convalidated | conrelid --------------------------------+--------------+----------------------- - fk_partitioned_fk_a_b_fkey | t | fk_partitioned_fk fk_partitioned_fk_1_a_b_fkey | t | fk_partitioned_fk_1 fk_partitioned_fk_2_a_b_fkey | t | fk_partitioned_fk_2 - fk_partitioned_fk_3_a_b_fkey | t | fk_partitioned_fk_3 fk_partitioned_fk_3_1_a_b_fkey | t | fk_partitioned_fk_3_1 + fk_partitioned_fk_3_a_b_fkey | t | fk_partitioned_fk_3 + fk_partitioned_fk_a_b_fkey | t | fk_partitioned_fk (5 rows) DROP TABLE fk_partitioned_fk, fk_notpartitioned_pk; @@@ -2009,7 -2009,7 +2025,11 @@@ ALTER TABLE fk_notpartitioned_fk ADD CO FOREIGN KEY (a, b) REFERENCES fk_partitioned_pk NOT ENFORCED; -- All constraints will be invalid, and _fkey2 constraints will not be enforced. SELECT conname, conenforced, convalidated FROM pg_constraint ++<<<<<<< ours +WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | conenforced | convalidated ----------------------------------+-------------+-------------- fk_notpartitioned_fk_a_b_fkey | t | f @@@ -2024,7 -2024,7 +2044,11 @@@ ALTER TABLE fk_notpartitioned_fk VALIDA ALTER TABLE fk_notpartitioned_fk ALTER CONSTRAINT fk_notpartitioned_fk_a_b_fkey2 ENFORCED; -- All constraints are now valid and enforced. SELECT conname, conenforced, convalidated FROM pg_constraint ++<<<<<<< ours +WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | conenforced | convalidated ----------------------------------+-------------+-------------- fk_notpartitioned_fk_a_b_fkey | t | t @@@ -2042,7 -2042,7 +2066,11 @@@ CREATE TABLE fk_partitioned_pk_3 PARTIT CREATE TABLE fk_partitioned_pk_3_1 PARTITION OF fk_partitioned_pk_3 FOR VALUES FROM (2000) TO (2100); SELECT conname, conenforced, convalidated FROM pg_constraint WHERE conrelid = 'fk_partitioned_pk'::regclass AND contype = 'f' ++<<<<<<< ours +ORDER BY conname COLLATE "C"; ++======= + ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | conenforced | convalidated ------------+-------------+-------------- selffk | t | f @@@ -2056,7 -2056,7 +2084,11 @@@ ALTER TABLE fk_partitioned_pk_2 VALIDAT ALTER TABLE fk_partitioned_pk VALIDATE CONSTRAINT selffk; SELECT conname, conenforced, convalidated FROM pg_constraint WHERE conrelid = 'fk_partitioned_pk'::regclass AND contype = 'f' ++<<<<<<< ours +ORDER BY conname COLLATE "C"; ++======= + ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs conname | conenforced | convalidated ------------+-------------+-------------- selffk | t | t diff --cc src/test/regress/sql/foreign_key.sql index 21ef1931f31,94d7cc47e50..00000000000 --- a/src/test/regress/sql/foreign_key.sql +++ b/src/test/regress/sql/foreign_key.sql @@@ -1449,14 -1449,14 +1449,22 @@@ ALTER TABLE fk_partitioned_fk ATTACH PA -- Child constraint will remain valid. SELECT conname, convalidated, conrelid::regclass FROM pg_constraint ++<<<<<<< ours +WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs -- Validate the constraint ALTER TABLE fk_partitioned_fk VALIDATE CONSTRAINT fk_partitioned_fk_a_b_fkey; -- All constraints are now valid. SELECT conname, convalidated, conrelid::regclass FROM pg_constraint ++<<<<<<< ours +WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs -- Attaching a child with a NOT VALID constraint. CREATE TABLE fk_partitioned_fk_2 (a int, b int); @@@ -1472,7 -1472,7 +1480,11 @@@ ALTER TABLE fk_partitioned_fk ATTACH PA -- The child constraint will also be valid. SELECT conname, convalidated FROM pg_constraint ++<<<<<<< ours +WHERE conrelid = 'fk_partitioned_fk_2'::regclass ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid = 'fk_partitioned_fk_2'::regclass ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs -- Test case where the child constraint is invalid, the grandchild constraint -- is valid, and the validation for the grandchild should be skipped when a @@@ -1486,7 -1486,7 +1498,11 @@@ ALTER TABLE fk_partitioned_fk ATTACH PA -- All constraints are now valid. SELECT conname, convalidated, conrelid::regclass FROM pg_constraint ++<<<<<<< ours +WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid::regclass::text like 'fk_partitioned_fk%' ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs DROP TABLE fk_partitioned_fk, fk_notpartitioned_pk; @@@ -1505,14 -1505,14 +1521,22 @@@ ALTER TABLE fk_notpartitioned_fk ADD CO -- All constraints will be invalid, and _fkey2 constraints will not be enforced. SELECT conname, conenforced, convalidated FROM pg_constraint ++<<<<<<< ours +WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs ALTER TABLE fk_notpartitioned_fk VALIDATE CONSTRAINT fk_notpartitioned_fk_a_b_fkey; ALTER TABLE fk_notpartitioned_fk ALTER CONSTRAINT fk_notpartitioned_fk_a_b_fkey2 ENFORCED; -- All constraints are now valid and enforced. SELECT conname, conenforced, convalidated FROM pg_constraint ++<<<<<<< ours +WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conname COLLATE "C"; ++======= + WHERE conrelid = 'fk_notpartitioned_fk'::regclass ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs -- test a self-referential FK ALTER TABLE fk_partitioned_pk ADD CONSTRAINT selffk FOREIGN KEY (a, b) REFERENCES fk_partitioned_pk NOT VALID; @@@ -1521,12 -1521,12 +1545,20 @@@ CREATE TABLE fk_partitioned_pk_3 PARTIT CREATE TABLE fk_partitioned_pk_3_1 PARTITION OF fk_partitioned_pk_3 FOR VALUES FROM (2000) TO (2100); SELECT conname, conenforced, convalidated FROM pg_constraint WHERE conrelid = 'fk_partitioned_pk'::regclass AND contype = 'f' ++<<<<<<< ours +ORDER BY conname COLLATE "C"; ++======= + ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs ALTER TABLE fk_partitioned_pk_2 VALIDATE CONSTRAINT selffk; ALTER TABLE fk_partitioned_pk VALIDATE CONSTRAINT selffk; SELECT conname, conenforced, convalidated FROM pg_constraint WHERE conrelid = 'fk_partitioned_pk'::regclass AND contype = 'f' ++<<<<<<< ours +ORDER BY conname COLLATE "C"; ++======= + ORDER BY conrelid::regclass::text, conname; ++>>>>>>> theirs DROP TABLE fk_notpartitioned_fk, fk_partitioned_pk;