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

From Robert Haas
Subject Re: Major Version Upgrade failure due to orphan roles entries in catalog
Date
Msg-id CA+TgmobZRL02-R7k_i3ENYz8CmqCPUZv6cHY51BejqPy7OhFJw@mail.gmail.com
Whole thread Raw
In response to Re: Major Version Upgrade failure due to orphan roles entries in catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Major Version Upgrade failure due to orphan roles entries in catalog
List pgsql-bugs
On Wed, Feb 25, 2026 at 1:30 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> missing grantor, source version >= 16:
>
> "role grant of R1 to R2 was granted by missing role with OID nnn"
> with detail
> "We'll dump the GRANT without a GRANTED BY clause, but this shouldn't happen."
>
> missing grantor, source version < 16:
>
> "role grant of R1 to R2 was granted by missing role with OID nnn"
> with detail
> "This state isn't unusual.  We'll dump the GRANT without a GRANTED BY clause."
>
> (We have pg_log_warning_detail back to v16, so it's okay to rely on
> a detail message.)  I feel like this could use more word-smithing,
> but it's covering more or less the right ground IMO.

Yeah, I agree both that it's directionally correct and that more
word-smithing might help. I feel like your main message is better than
your detail, but I'm not sure exactly what would be an improvement.
Sometimes I find it helpful to play with the message level and the
primary message wording as a way of indicating the gravity, e.g.

info: dumping grant of role \"%s\" to role \"%s\" without GRANTED BY,
because role with OID %u no longer exists

vs.

warning: grant of role \"%s\" to \"%s\" has invalid grantor OID %u
detail: this grant will be dumped without GRANTED BY

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-bugs by date:

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