pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix lock level used for partition when detaching it 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix lock level used for partition when detaching it @ 2018-12-20 19:44 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2018-12-20 19:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix lock level used for partition when detaching it @ 2018-12-20 19:44 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2018-12-20 19:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7b14bcc06cc56b110118fba408f4b9b72a663387 Modified Files -------------- src/backend/commands/tablecmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix lock level used for partition when detaching it @ 2018-12-20 19:44 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2018-12-20 19:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1c142612c846cd01ed0615041e09e6fab7d44571 Modified Files -------------- src/backend/commands/tablecmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-12-20 19:44 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-12-20 19:44 pgsql: Fix lock level used for partition when detaching it Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-12-20 19:44 pgsql: Fix lock level used for partition when detaching it Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-12-20 19:44 pgsql: Fix lock level used for partition when detaching it Alvaro Herrera <alvherre@alvh.no-ip.org>
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