Re: Major Version Upgrade failure due to orphan roles entries in catalog
| От | Tom Lane |
|---|---|
| Тема | Re: Major Version Upgrade failure due to orphan roles entries in catalog |
| Дата | |
| Msg-id | 301798.1772044229@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Major Version Upgrade failure due to orphan roles entries in catalog (Robert Haas <robertmhaas@gmail.com>) |
| Ответы |
Re: Major Version Upgrade failure due to orphan roles entries in catalog
|
| Список | pgsql-bugs |
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Feb 25, 2026 at 12:39 PM Tom Lane <tgl@sss.pgh.pa.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
В списке pgsql-bugs по дате отправления: