Re: Major Version Upgrade failure due to orphan roles entries in catalog

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Virender Singla <virender(dot)cse(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Aniket Jha <aniketkumarj(at)gmail(dot)com>
Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog
Date: 2026-02-25 18:47:52
Message-ID: CA+TgmobZRL02-R7k_i3ENYz8CmqCPUZv6cHY51BejqPy7OhFJw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Feb 25, 2026 at 1:30 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-02-25 18:58:11 Re: Major Version Upgrade failure due to orphan roles entries in catalog
Previous Message Tom Lane 2026-02-25 18:30:29 Re: Major Version Upgrade failure due to orphan roles entries in catalog