From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Ensure correct lock level is used in ALTER ... RENAME
Date: Wed, 20 Oct 2021 16:59:29 +0900
Message-ID: <YW/MYdSRQZtPFBWR@paquier.xyz> (raw)
In-Reply-To: <E1mcxKO-0004JW-3d@gemulon.postgresql.org>
References: <E1mcxKO-0004JW-3d@gemulon.postgresql.org>
Hi Alvaro,
On Tue, Oct 19, 2021 at 10:11:24PM +0000, Alvaro Herrera wrote:
> Ensure correct lock level is used in ALTER ... RENAME
>
> 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.
>
> After this fix, ALTER INDEX <sometable> 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=hippopotamus&dt=2021-10-19%2023%3A43%3A1...
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, alvherre@alvh.no-ip.org
Subject: Re: pgsql: Ensure correct lock level is used in ALTER ... RENAME
In-Reply-To: <YW/MYdSRQZtPFBWR@paquier.xyz>
References: <E1mcxKO-0004JW-3d@gemulon.postgresql.org> <YW/MYdSRQZtPFBWR@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox