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 1vx47g-00DRWS-1R for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2026 14:19:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vx47d-001D7q-37 for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2026 14:19:46 +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 1vx47d-001D7i-28 for pgsql-bugs@lists.postgresql.org; Mon, 02 Mar 2026 14:19:46 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vx47c-000000001pB-03Rb for pgsql-bugs@lists.postgresql.org; Mon, 02 Mar 2026 14:19:45 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-b8d7f22d405so705804966b.0 for ; Mon, 02 Mar 2026 06:19:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772461182; cv=none; d=google.com; s=arc-20240605; b=kgjRfZlKBx3cv2nFlsNiq+TFXsahBsDl3aiWnM4JZ0YSl5a4zKTU6IZIpMY/zNWsm+ 5940ndaXjCPeMTaf7IAEeLIZ3Ty5JNX0eMcEprAmJYFXDGN7oLOsYSb3q2aNQnjzVIqQ 4cE4Q9Evy32h7QFcMTyIWjxKVQkYpL9OIHPWJ+W56ROZdoF336D8E+gZppaedLp/Smh6 skq2VtZ4fZ1GUZmpGLbQEANfnml+00gTzqPogC4MHpFtzU0I+DtgUE17p5oRG2ativGu TGRbWOPFLTzpFesyPn3+gzvInQg2dKDSGZAzlxDZovVKKlHkFqv4FA3voTWG+yklJd+X jzVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=he9HOH7hgw06mpoRUYwo0EyzGD8SQi7CJwpN9Q6QOm8=; fh=oRA88uqHw5gRbHk1/IzW7tmopcREhf+QFmWBLmgMCcA=; b=EL4vZ+2q1gYV3g6CT/N0fkpt/bPJTHUao1br05U+ovUCyhHfyvTzulXP6NTJoFgaUl r9wtHOPcYaCMOsF0I/4+TXAqvX2VofoJuqbCIX7ScaKaLoJ+ccYcAVSWWVtiXrEc+U3G OXaFgyMRU9fQyvlmTu/Ijptbwy9Tr/M57pYG6lLLudAdMg5IxN0WRux9LUr+aEzHcPME M7OWqWqAnPxdEw+5SoShv/UTiEGB7gErBcL89lCnofEee/qBxY8k9pht1y2REtw1mcFm 12sJcCbQv1sln2JXbgPVhTVCNwmxsucrfDx2BCXJ3FWnP39h/C/H8+cy9KVId3Ci6xW9 uGdg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772461182; x=1773065982; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=he9HOH7hgw06mpoRUYwo0EyzGD8SQi7CJwpN9Q6QOm8=; b=WZ7Td2I5Ji9nKvlHYRpU3vT8Ks0kIXerRFBj6fcyCMLBZ4he/KQy4sI8GMePcoQ0L1 1Z7VR8hTniNZhRM6xiPiQ1/Xh8Czz5GK52jtCSU4SwYU5yVUodi4BnMsAC2xJpm5+ESV 8QU/16rsdZkmY2RLiYvN8XJXlVAWw1hTkRW+FpvC3lYlEmNan/W4eBmd6AawH+duapjl VVTlfxKPT71FjZbAqeoelOODwUa9wxpSesKy5yHm5fwXEC/K7H0SR4s+npz6is7NL+jB YQcOzCPbM92zcUoZfaeTeErpmWYw4cAnLYsAcIpn82LsaI2h4y8s1kSL9S4SO0j7aTOM 1Bfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772461182; x=1773065982; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=he9HOH7hgw06mpoRUYwo0EyzGD8SQi7CJwpN9Q6QOm8=; b=bctMIV1veAZqLhAplSUYRtPJF0NZ1YtCS1ELbHWOXMLUvYod14rD2DuwOVFuDuO6j1 JfwEGETLH98Bc9R62dILEuJDyAjDZKzXItCP8tvA5Bl+1Z6lUSpDG+Bojua1+hK+S03l xC8vQaE0OsN2JvUsF2Eo0XrbVnhGFb/ibdnsyI0KjTBASqStuNF3LDyvnfXaxJsOibEo fD5LTG0iREz4WHtdGcQhRaj5XVBIuZ9oy1Vv7BNWF/mAo3IuEEipcjaNXBh6y2oPWAT9 8q0mRO7tgMz3oVlnOgm9EevBKNJ/XMOQRsZNNtXvJtPA2lZ1TzqxLPHga1+VbvuclsVR 0cvw== X-Forwarded-Encrypted: i=1; AJvYcCX3cmXYgxlUnNPre3iho1P7yT7Y7bXnv91PaqNpC8uuu7Zb+f5tJUVndPjKykl/CycqDSq0Ox+fyctX@lists.postgresql.org X-Gm-Message-State: AOJu0YwS1MZibma7djtCT5/XS3+aMUKhEPUgkHbOaFA+4zp8oX4Bbl39 Jz1w1Xm+/4Lk9tQviuhnxjBa4tcMukaWqRfbcojGEbNbELVYaSa92AC6oqyeU2un1LdGpyoYkno 1J8SnsmxUBzVOML/lVXw8zkRFdRVZdi8= X-Gm-Gg: ATEYQzwo/cAM7l/jMUOE8zf/ohPCx2AS4XDh+7mdFyUOO9dS4z3z7x0F1ClvIXJef0G GiAf7AvGUFKaGji41Co6Mx9pn8k4q7bzsOciXAljWtIM4RhKjJLhfYdbK9HnlxIt0vZP9FElA+O ubbDOYpEVSmsgrBZaVfjEy8IfhrrsCifMsk8us+3P4FAID5jXCHuFz2GPeBapKUbODneRbr8DuD xLC4UslPkMeKLjnxikGRdk5dJGZeMYTb30ZC5RHYT6PlvniX3rEMNASrKUJdkwqXG0NjypZ+AHm eeDR+vVfvx06VbPE0qkYmhFD59ddKso+R7oYxUU= X-Received: by 2002:a17:906:6a27:b0:b88:68b6:e578 with SMTP id a640c23a62f3a-b93763bfb31mr894715066b.25.1772461182170; Mon, 02 Mar 2026 06:19:42 -0800 (PST) MIME-Version: 1.0 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> <1106526.1772229127@sss.pgh.pa.us> In-Reply-To: <1106526.1772229127@sss.pgh.pa.us> From: Robert Haas Date: Mon, 2 Mar 2026 09:19:29 -0500 X-Gm-Features: AaiRm530mfKExv6OiGYOmojGeQpF_bEydInbHCZTnu1pAqB0oqRHaVqjCPkS4eo Message-ID: Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog To: Tom Lane Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Virender Singla , pgsql-bugs@lists.postgresql.org, Aniket Jha Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Feb 27, 2026 at 4:52=E2=80=AFPM Tom Lane wrote: > > 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. Personally, I'd find the extra verbosity helpful, but I don't care that much if you see it otherwise. > > 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. Yeah, sure. I was just mentioning it in case you were planning to pursue that in a separate thread. --=20 Robert Haas EDB: http://www.enterprisedb.com