Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vvJef-00DPmV-2Z for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Feb 2026 18:30:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvJee-008CUZ-26 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Feb 2026 18:30:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vvJee-008CUR-1H for pgsql-bugs@lists.postgresql.org; Wed, 25 Feb 2026 18:30:36 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vvJeb-00000001A0i-1SSL for pgsql-bugs@lists.postgresql.org; Wed, 25 Feb 2026 18:30:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 61PIUT50301799; Wed, 25 Feb 2026 13:30:29 -0500 From: Tom Lane To: Robert Haas cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Virender Singla , pgsql-bugs@lists.postgresql.org, Aniket Jha Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog In-reply-to: References: <202502131716.7mgkcnrem2hn@alvherre.pgsql> <2939991.1740089974@sss.pgh.pa.us> <179448.1772033773@sss.pgh.pa.us> <265501.1772038216@sss.pgh.pa.us> <296083.1772041154@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 25 Feb 2026 13:02:46 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <301797.1772044229.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 25 Feb 2026 13:30:29 -0500 Message-ID: <301798.1772044229@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Wed, Feb 25, 2026 at 12:39 PM Tom Lane 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