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.94.2) (envelope-from ) id 1tid5O-000YUF-87 for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Feb 2025 17:33:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tid5M-00BTJb-9a for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Feb 2025 17:33:12 +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.94.2) (envelope-from ) id 1tid5M-00BTJT-1d for pgsql-bugs@lists.postgresql.org; Thu, 13 Feb 2025 17:33: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.96) (envelope-from ) id 1tid5K-000eNn-1n for pgsql-bugs@lists.postgresql.org; Thu, 13 Feb 2025 17:33: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 51DHX7rJ3663283; Thu, 13 Feb 2025 12:33:07 -0500 From: Tom Lane To: =?utf-8?Q?=C3=81lvaro?= Herrera cc: 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: <202502131716.7mgkcnrem2hn@alvherre.pgsql> References: <202502131716.7mgkcnrem2hn@alvherre.pgsql> Comments: In-reply-to =?utf-8?Q?=C3=81lvaro?= Herrera message dated "Thu, 13 Feb 2025 18:16:02 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3663281.1739467987.1@sss.pgh.pa.us> Date: Thu, 13 Feb 2025 12:33:07 -0500 Message-ID: <3663282.1739467987@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =?utf-8?Q?=C3=81lvaro?= Herrera writes: > Hmm, I think fixing the bug as Tom suggests downthread is probably a > good idea, but I think we should in addition change pg_dumpall to avoid > printing a GRANT line if there's no grantee. On the one hand, my proposed patch can do nothing to fix existing dangling entries in pg_auth_members, so hacking pg_dump seems like a good workaround if the problem already exists. On the other hand, if we make pg_dump do that then we won't detect future problems of the same ilk. > Maybe turning one of these LEFT > JOINs into a regular inner join is a sufficient fix for that: Probably change all three, if we're to do this at all. regards, tom lane