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 1vw5ks-002GCI-0o for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Feb 2026 21:52:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vw5kr-0077rM-0g for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Feb 2026 21:52:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vw5kq-0077rD-35 for pgsql-bugs@lists.postgresql.org; Fri, 27 Feb 2026 21:52:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vw5ko-00000001dPl-0Vzq for pgsql-bugs@lists.postgresql.org; Fri, 27 Feb 2026 21:52:12 +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 61RLq7t41106527; Fri, 27 Feb 2026 16:52:07 -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> <301798.1772044229@sss.pgh.pa.us> <304751.1772045891@sss.pgh.pa.us> <1103272.1772227345@sss.pgh.pa.us> <1104379.1772227731@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 27 Feb 2026 16:42:30 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1106525.1772229127.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 27 Feb 2026 16:52:07 -0500 Message-ID: <1106526.1772229127@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Fri, Feb 27, 2026 at 4:28 PM Tom Lane wrote: >> Sigh, this time with it really attached. > I suggest that having both a variable called dump_grantor and one > called dump_grantors is a little bit subtle, but other than that this > looks good on a quick read-through. Fair ... do you have a suggestion for less confusing names? I considered naming the new variable "dump_this_grantor", but thought it was longer without being more helpful ... but maybe you disagree. > Regarding this point: >> I'm inclined to >> think that is an overreaction to the possible unreliability of the >> data (and from your comment upthread you might agree). > I think this is my code, so I certainly believed I had the right idea > at the time, but we could revisit that. One thing to keep in mind is > that in v15-, regardless of the notional grantor, in effect all grants > are independent of the existence of any other user. In v16+, they form > a tree structure, with grants depending on their grantors. So, when > upgrading from v15- to v16+, we have to end up with a valid tree > structure, but there's absolutely no reason to think that we already > have one. Yeah, that is certainly a hazard we'd have to worry about. As I said, I'm content to leave it as-is for now. regards, tom lane