diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-12-20 16:42:13 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-12-20 16:42:13 -0300 |
commit | 7b14bcc06cc56b110118fba408f4b9b72a663387 (patch) | |
tree | 70ccacbe456ae514bdabe74947dc61e87713bc84 /src/backend/access/gist/gist.c | |
parent | 42bdf853f664d0566c9e7af027635b48d66c0f71 (diff) | |
download | postgresql-7b14bcc06cc56b110118fba408f4b9b72a663387.tar.gz |
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
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions