Hi all!

On Sun, 10 Aug 2025 at 12:00, Alexander Lakhin <exclus...@gmail.com> wrote:
>
> Hello Noah,
>
> 04.08.2025 03:03, Noah Misch wrote:
> > Pushed as 0decd5e.  ...
>
> Please look at a new anomaly introduced with that commit. The following
> script:
> createdb regression
>
> echo "
> CREATE USER u1;
> ALTER DEFAULT PRIVILEGES FOR ROLE u1 REVOKE INSERT ON TABLES FROM u1;
>
> CREATE USER u2;
> ALTER DEFAULT PRIVILEGES FOR ROLE u2 REVOKE INSERT ON TABLES FROM u2;
> " | psql regression
>
> pg_dump regression
>
> triggers:
> pg_dump: pg_dump_sort.c:454: DOTypeNameCompare: Assertion `0' failed.

I reproduced this. Indeed, in case of default acl we happen to use OID sort.

PFA resolves this issue. I simply added DEFAULT ACL case-specific
tiebreaker that resolves object order.

-- 
Best regards,
Kirill Reshke

Attachment: 0001-Handle-DEFAULT-ACL-case-in-DOTypeNameCompare-functio.patch
Description: Binary data

Reply via email to