pgsql: Fix lock level used for partition when detaching it - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Fix lock level used for partition when detaching it
Date
Msg-id E1ga4FU-0005Cv-8W@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix lock level used for partition when detaching it

For probably bogus reasons, we acquire only AccessShareLock on the
partition when we try to detach it from its parent partitioned table.
This can cause ugly things to happen if another transaction is doing
any sort of DDL to the partition concurrently.

Upgrade that lock to ShareUpdateExclusiveLock, which per discussion
seems to be the minimum needed.

Reported by Robert Haas.

Discussion: https://postgr.es/m/CA+TgmoYruJQ+2qnFLtF1xQtr71pdwgfxy3Ziy-TxV28M6pEmyA@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/053ad56d275d343b407bc5fd389bad6f3e340562

Modified Files
--------------
src/backend/commands/tablecmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: fix ancient mistake in search_path documentation.
Next
From: Tom Lane
Date:
Subject: pgsql: Base information_schema.sql_identifier domain on name,not varch