Re: Major Version Upgrade failure due to orphan roles entries in catalog - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Major Version Upgrade failure due to orphan roles entries in catalog
Date
Msg-id 296083.1772041154@sss.pgh.pa.us
Whole thread Raw
In response to Re: Major Version Upgrade failure due to orphan roles entries in catalog  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Major Version Upgrade failure due to orphan roles entries in catalog
List pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Feb 25, 2026 at 11:50 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If you're good with pg_dumpall producing a warning and then emitting
>> the GRANT with no grantor clause, I will go make that happen.

> Well, I guess I don't really see why there should be a warning.

Because the result of the restore will not match how things were
in the source database?  True, we do not have any way to make them
match, but that doesn't mean that pg_dumpall has fulfilled all
expectations.

> Now, if you go and do as you propose here, and adjust the code so that
> the grant is dumped but a warning is produced, my fear is that someone
> upgrading from v15- to v16+ will see that warning and think that there
> is a problem with their database that needs fixing.

On the other hand, if we produce no warning and yet the restored DB
is unlike the original, that could also be cause for concern.

> Moreover, we'll emit essentially the same warning for the member case,
> where the warning does point to a problem that someone might want to
> think about correcting, and exactly the same warning against a v16+
> database where it indicates that something has actually gone wrong.

That's a fair point, but maybe it could be addressed by phrasing the
message differently for the different cases.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog
Next
From: Robert Haas
Date:
Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog