Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table - Mailing list pgsql-bugs

From Hüseyin Demir
Subject Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table
Date
Msg-id CAB5wL7Zmy9PZ_TeEyzN0__vm2S4FUQPTqZZsT1rbnWa7WUGKLA@mail.gmail.com
Whole thread
In response to Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table
Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table
List pgsql-bugs
Hi,

> So what I'm thinking today is we apply the putid() fix only in HEAD,
> and make dumputils.c ignore unquoted all-numeric roles only if
> server version >= 19.  This means we don't have a fix for the actually
> known problems with old server versions, which is kind of sad, but
> given Laurenz's point I don't think a reliable fix is possible with
> an unpatched server.
> An alternative answer is to back-patch the putid() fix and teach
> dumputils.c to consider the server minor version when deciding whether
> to reject unquoted all-numeric roles.  We don't typically make pg_dump
> pay attention to minor versions, but it would provide a pathway for
> users to deal with this problem: if you've got dangling grants then
> update the old server before dumping.

It will require an almost mandatory minor-version update prior to the
upgrade, which adds extra friction and a more complex upgrade story
for our users since both sides need to be updated.
Another point is that quoting all-digit roles alters the aclitem::text
representation across psql, extensions, and client apps giving it a
much broader behavioral impact than just pg_dump.

Finally, it introduces a bit of a maintenance headache for committers,
who will have to adjust the macro on HEAD after back-patching to v18.

Happy to hear other ideas.

Regards,
Demir.



pgsql-bugs by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: BUG #19484: Segmentation fault triggered by FDW
Next
From: Rui Zhao
Date:
Subject: Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table