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 1tlVoK-00CbqS-Av for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Feb 2025 16:23:32 +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 1tlVoI-00CS3j-L4 for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Feb 2025 16:23:30 +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 1tlVoI-00CS20-B9 for pgsql-bugs@lists.postgresql.org; Fri, 21 Feb 2025 16:23:30 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tlVoF-002Bcg-2j for pgsql-bugs@lists.postgresql.org; Fri, 21 Feb 2025 16:23:29 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-abb90f68f8cso434512366b.3 for ; Fri, 21 Feb 2025 08:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1740155005; x=1740759805; darn=lists.postgresql.org; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:from:to:cc:subject:date:message-id:reply-to; bh=ZHlXreaZ5gEVHMHxSM7q5Fh1oJB98ZDxTWyWVqlSba8=; b=K1xT6ryliyXuB+6fR6/xgCygwFj7GyZrXAp8fPCXWOJLWRZpZKG7FWySNGDoM5+c3J W8dXRiTlPNbEypUrgo46OdpcsyF1vZ/b7SA7tE/eEUngObYQ0eTRBk/+ZmdZq3zRnbkZ qhcyAq9C4TbH56wBFRCZ9UjGj7zUZxeX/WiEEuxi3N4CeohxSxmkWRvBHd8wXU6AmnzY OdwTZ9Eem+0Z1nT0QvK6/8d70DVpcBJ3MjpgTdsNP2TGgEf5BEBDsGnTVJcpKPapuLGH d3nvv8wiec1ZZ2hDPbcYfU2ag7p71vPckfwYkJnb+Getj2wMKZ/Ev5tXAU9DF2g/O4KN j0eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740155005; x=1740759805; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZHlXreaZ5gEVHMHxSM7q5Fh1oJB98ZDxTWyWVqlSba8=; b=wMS0DjGGztTudypCJCfiniEeMc2a0CwC5YSyuj3fZftGNUGzczqIwHPYm1DqB1j5jY mRs+WzBXN64G0OSMQ7TRb/rSJyx3P20sW6s3qta+eNthq4QjjItW6eupWaOLsfnfOaos 6i3EA11CytzAIqrOdbk28GquV2i9sFqB3jdyJWBvSiuia6QoxmOHGycfReBpz6qay5jt a1pbj4CKE1mi9wrH8MW8v5QdjLrQ7vRGUQa8GVCc8RfGSxm1yBKHTiqyZcbmCjJCDwbz /2n0AC4RP7x8h2d8rZ8MJWeWMIJho+rnqm6kX+QfH3IKv4TidlZm0HelgYFwVFZoKD5n CxQg== X-Forwarded-Encrypted: i=1; AJvYcCWzgMjsA2nmgHJB8xv5Ou5zY0EzhaNiCQFiwK2BYwG9Ve/DsPEmYdaJ43+4q8zM69g5LAR1V24+t9Rl@lists.postgresql.org X-Gm-Message-State: AOJu0Yy3w0f2mCFPFwUoltVLZk5jLoKAx3gF3/Dt8RqhUZPuDYhQ9Vg5 q37oxgOqurc1Nbl8BxdV0XsR5YyWut94E0DCroKUgxYtany8k8FL8ldg6YwBTxTkO3ZOm8+zcB1 uhn6DboSGxygcbsuUJRrBFlRyp4fUdwQuK0k31uDNS0NzzSYQ0JU7w0hjSFyY X-Gm-Gg: ASbGncs44vBQzg93DESbY2+wkknbu1qViH6xCWCyyU0DDWXTvkbilnDTtUHNF3y7YaK 6x6MG+N+5Bj8cgTNjj/6+RLZuvQ/3aeHfnLdR42cqLoY57DZtknTkln0Gf3wQQb6xdlj9yELXz6 b64sQhyUE77fOSqZdnb8bfh83hNpKU8O9dddv6F5SKSFBRYVzXUOnjvf/ySpo+HtnhrqFSkCQu+ XuzcpPqjaUwau7xp7bLCSON2xsGaeX5Mn8kWXRtg/3ihA9yJ9RWcCFMgSfONIrNB6QS4e1GXDgE CpZduvUxsaUtCuQZxZUQDQsoqywlbdWtdtGlkCoLriqE4LM= X-Google-Smtp-Source: AGHT+IGxB3nE83XTLVYP4ZIR8Bg37YsXAX+tGULIwc6h2wNhGkK5dqCNWQoLOYsyntVhpjxWc+NMUw== X-Received: by 2002:a17:906:4fc7:b0:ab7:fc9a:28e2 with SMTP id a640c23a62f3a-abc09c30002mr395679666b.47.1740155005297; Fri, 21 Feb 2025 08:23:25 -0800 (PST) Received: from localhost.localdomain ([2001:871:260:8267:c285:8f1e:dbf7:2a9f]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-abb92dc1399sm1083648366b.175.2025.02.21.08.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2025 08:23:25 -0800 (PST) Message-ID: <58e47d097ed2a1512f47891293a7102d573fc970.camel@cybertec.at> Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog From: Laurenz Albe To: Tom Lane Cc: =?ISO-8859-1?Q?=C1lvaro?= Herrera , Virender Singla , pgsql-bugs@lists.postgresql.org, Aniket Jha Date: Fri, 21 Feb 2025 17:23:24 +0100 In-Reply-To: <3073713.1740148903@sss.pgh.pa.us> References: <202502131716.7mgkcnrem2hn@alvherre.pgsql> <2939991.1740089974@sss.pgh.pa.us> <3073713.1740148903@sss.pgh.pa.us> User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-02-21 at 09:41 -0500, Tom Lane wrote: > Laurenz Albe writes: > > I have one question about the first patch: > > > > - if (addroleto || adminmembers || rolemembers) > > > + if (addroleto || adminmembers || rolemembers || !superuser()) > > > CommandCounterIncrement(); > > > That change seems unrelated to the problem at hand, and I don't see it > > mentioned in the commit message. Is that an oversight you fixed on the > > fly? > > Well, kinda, because the patch doesn't work without it. The > problematic case is where none of those 3 flags are set and also > !superuser, so that we decide we need the default grant implemented a > few lines further down. That grant now has an explicit reference to > the new roleid, and if we haven't CommandCounterIncrement'ed, the > pg_shdepend code will error out because it doesn't see the catalog > entry for roleid. Thanks for the explanation. That might be worth a comment. Yours, Laurenz Albe -- *E-Mail Disclaimer* Der Inhalt dieser E-Mail ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. *CONFIDENTIALITY NOTICE & DISCLAIMER *This message and any attachment are confidential and may be privileged or otherwise protected from disclosure and solely for the use of the person(s) or entity to whom it is intended. If you have received this message in error and are not the intended recipient, please notify the sender immediately and delete this message and any attachment from your system. If you are not the intended recipient, be advised that any use of this message is prohibited and may be unlawful, and you must not copy this message or attachment or disclose the contents to any other person.