Always have pg_dump write rules in a consistent order

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Always have pg_dump write rules in a consistent order
Date: 2024-10-29 18:50:42
Message-ID: b4e468d8-0cd6-42e6-ac8a-1d6afa6e0cf1@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
0001-Make-pg_dump-always-write-rules-in-a-stable-order.patch text/x-patch 1.4 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Raghuveer Devulapalli 2024-10-29 19:23:58 Re: Popcount optimization using AVX512
Previous Message David E. Wheeler 2024-10-29 18:12:49 Re: RFC: Extension Packaging & Lookup