| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| 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:30:29 |
| Message-ID: | 301798.1772044229@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Feb 25, 2026 at 12:39 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2026-02-25 18:47:52 | Re: Major Version Upgrade failure due to orphan roles entries in catalog |
| Previous Message | Robert Haas | 2026-02-25 18:02:46 | Re: Major Version Upgrade failure due to orphan roles entries in catalog |