Commit 7b14bcc
committed
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.com1 parent 42bdf85 commit 7b14bcc
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14588 | 14588 | | |
14589 | 14589 | | |
14590 | 14590 | | |
14591 | | - | |
| 14591 | + | |
14592 | 14592 | | |
14593 | 14593 | | |
14594 | 14594 | | |
| |||
0 commit comments