public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Robert Haas <[email protected]>
Cc: Álvaro Herrera <[email protected]>
Cc: Virender Singla <[email protected]>
Cc: [email protected]
Cc: Aniket Jha <[email protected]>
Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog
Date: Wed, 25 Feb 2026 13:30:29 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoYJ8Y1G1r9U7pRwnyw=8dmM0xygLguE+bdihkN8GwPuCQ@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CA+TgmoauoiW4ydDhdrseg+DD4Kwha=+TSZp18BrJeHKx3o1Fdw@mail.gmail.com>
	<[email protected]>
	<CA+TgmoYFc1x11Y7AHxn6Jb0mvJ9-aPttmjqezj=YKnHmqVb-Wg@mail.gmail.com>
	<[email protected]>
	<CA+TgmobNKFc34nj+w6iX0zWJ1=mfYWqQS91PqsJrm4VD4o1yOw@mail.gmail.com>
	<[email protected]>
	<CA+TgmoYJ8Y1G1r9U7pRwnyw=8dmM0xygLguE+bdihkN8GwPuCQ@mail.gmail.com>

Robert Haas <[email protected]> writes:
> On Wed, Feb 25, 2026 at 12:39 PM Tom Lane <[email protected]> wrote:
>>> 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.

> I like that idea.

OK, so we need to pick wordings.  Right now we use this wording for
all three cases:

            /* translator: %s represents a numeric role OID */
            pg_log_warning("found orphaned pg_auth_members entry for role %s",
                           PQgetvalue(res, start, i_roleid));

I don't really love that wording for any of these cases, because
(a) "orphaned" isn't a word we use much, and (b) conflating the
role, member, and grantor doesn't seem helpful.  How about
something like

missing role:

"ignoring role grant for missing role with OID nnn"

missing member:

"ignoring role grant to missing role with OID nnn"

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.

			regards, tom lane






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox