Always have pg_dump write rules in a consistent order
Andreas Karlsson <andreas@proxel.se>
From: Andreas Karlsson <andreas@proxel.se>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-10-29T18:50:42Z
Lists: pgsql-hackers
Attachments
- 0001-Make-pg_dump-always-write-rules-in-a-stable-order.patch (text/x-patch) patch 0001
Hi, When working on a new feature for PostgreSQL I noticed that the pg_upgrade tests became flaky due to rules being dumped in a different order between the original cluster and the upgraded cluster. (For context: my regress scripts left a bunch of views with dependency circles which I had forgot to clean up.) So I propose that we sort rules on (schema, name, relation_name) instead of (schema, name, oid) like it currently does. The patch itself is small enough and makes it easier to test that we upgrade rules and views correctly with pg_upgrade. Andreas
Commits
-
pg_dump: provide a stable sort order for rules.
- cc9a62c51a18 13.22 landed
- 25388fb2cb84 14.19 landed
- e99010cbd8e2 15.14 landed
- 9affed26349a 16.10 landed
- 5dd4957b28df 17.6 landed
- 350e6b8ea86c 18.0 landed