Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1md6Vk-0006NF-Qj for pgsql-committers@arkaria.postgresql.org; Wed, 20 Oct 2021 07:59:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1md6Vj-0000PC-OO for pgsql-committers@arkaria.postgresql.org; Wed, 20 Oct 2021 07:59:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1md6Vi-0000P3-3J for pgsql-committers@lists.postgresql.org; Wed, 20 Oct 2021 07:59:43 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1md6Ve-0004lz-Rr for pgsql-committers@lists.postgresql.org; Wed, 20 Oct 2021 07:59:41 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id E1B8A3201EB4; Wed, 20 Oct 2021 03:59:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 20 Oct 2021 03:59:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=EZqJt0sDnRbLDGLsls84bJSNjUI OuAxyL838kb0lwlA=; b=ICsEBTGdawQW8WN187b+DK1d27vAw9bgvSEKZO5abDh 10HL2dR7zlMBfoeSm49xTBwLYwBYw9/E0kdyuf3Z2SAG2g0SvP9eOlDRDvfn8b9l omsawBGkddLhh/hVXXxD+ou62ZhBonzEhjbfNe7KB92xMfUhEBNRFAyxKPcsqGaQ f+vDBWYawC9EAFqERyEGMMwIDq9V6+dKSgLy6+N1VdIfyQIWph7OnaKlWwWxxIj9 S0tN8jvvI5j5VHAmA8yVKRUhUk2tXsEsfvFhkBMFEjRBdQy7juco9XqkwGQdDfKz bQoHGQjXGpbtMeH4tfFZE9iYtzHGVWsv+PoGNYZ8mxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=EZqJt0 sDnRbLDGLsls84bJSNjUIOuAxyL838kb0lwlA=; b=ihY0iBJ9PCxEDffheZSDWR +XkxGMbuAh7nk0pygRbX+UQKbkm4W1ewIijczRc8aQ6nEgCEIAOaQZPKVAf2d8it mBnvlf7Ni+Y7JyS+ccRMXKcTp+E8U8buQJYmzRJTpFvnLakVgmgPBF3Ggygju0jK rSAUA2j/ROxAoQzXglfu8v17ob9MqgTIDP5eNDQwpwW8YtY1t1iN3P7b/1op18ce zHxPovh+VOCO3L/jPsDiS4XkrHQxnM/KZAKATcy5LKN4m6IrZA0Q77Aj6dHLaFc0 FBbiGeICB2YdOM4jATujCdST3ewMFLGPX/xDvIlFl3kAf9Ixy99NaEmdXgzRKeBg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvfedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepffdufeeflefghfekudekkeev vddugfeiteekkeduleefvefhhffftdduffeiuedtnecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Oct 2021 03:59:33 -0400 (EDT) Date: Wed, 20 Oct 2021 16:59:29 +0900 From: Michael Paquier To: Alvaro Herrera Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Ensure correct lock level is used in ALTER ... RENAME Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uchsu2fGCBC2I1ys" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --uchsu2fGCBC2I1ys Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Alvaro, On Tue, Oct 19, 2021 at 10:11:24PM +0000, Alvaro Herrera wrote: > Ensure correct lock level is used in ALTER ... RENAME >=20 > Commit 1b5d797cd4f7 intended to relax the lock level used to rename > indexes, but inadvertently allowed *any* relation to be renamed with a > lowered lock level, as long as the command is spelled ALTER INDEX. > That's undesirable for other relation types, so retry the operation with > the higher lock if the relation turns out not to be an index. >=20 > After this fix, ALTER INDEX RENAME will require access > exclusive lock, which it didn't before. hippopotamus and jay are complaining that this commit has introduced a test with ordering issues: ORDER BY relation::regclass::text; relation | mode --------------------------------+--------------------- - alter_idx_rename_test_2 | AccessExclusiveLock alter_idx_rename_test_parted_2 | AccessExclusiveLock + alter_idx_rename_test_2 | AccessExclusiveLock (2 rows) https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dhippopotamus&dt= =3D2021-10-19%2023%3A43%3A14 -- Michael --uchsu2fGCBC2I1ys Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmFvzGEACgkQnvQgOdby QH0+ow/9E3u33yVdia6ddvzjLt1uyDXIjUwp0H+r9uBduaslasVaHysGrS2RTDaI JEbDF+YNz4m3MnwTEHDfDEQEjuc30n6YBmy+Q3w7WCoQCZB+cX6dfoj6TZU/8XOP itITSTllc/2KuYmZeYUjDzYnxVpMEhdLURu1a2MuCO4ZHaQFrmwBI05/JZALfv/+ uax57vqa4AVKiltQAL8J3dwgTvrmDRT4zRwdhdYzjMg2x2eB+okmmC13UU6hL49d 0eX1h0lqHttozl7P5QY1Y2z+X1fHGipAXRyTxzS4kncx4rCmxbN1gk1JDZ8QQ1dC F6EgD4dtjWE+XqtzYHpDtwLaa7UhNf7G3K1LmIPPk6DrBm80T7dTdP0oRorxF5If iJdEh4na9qML4+NFvN0P6vkmbSOfF7MJ24PSMZjd8p44bYz950rAfPmILTS1V4Dz M86akl/u/lFHPliGefGazKST2SBYP95XME7e1H0oijh7CN/b+tzGrwmTH6766NRJ rmnPoFbYHqUFUYWeka+nE9tvNHTAkgQbWpwUnyJqeWGENny8WqqWC3imZTkJpT1q PKOCfpizYjyf3jAIaugaUVahe3ZMVPM1fsXHxALbsZXPHC9bZILYWoscqjHf5gGR EETpKvLmVd1o2X0R9MB6xGskBFdG5TjNQpE3+M6k0+Z4SvBhHCk= =uY+p -----END PGP SIGNATURE----- --uchsu2fGCBC2I1ys--