pgsql: Fix possibile deadlock when dropping partitions.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix possibile deadlock when dropping partitions.
Date: 2017-04-11 13:18:38
Message-ID: E1cxvgs-0002FJ-Nm@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix possibile deadlock when dropping partitions.

heap_drop_with_catalog and RangeVarCallbackForDropRelation should
lock the parent before locking the target relation.

Amit Langote

Discussion: http://postgr.es/m/29588799-a8ce-b0a2-3dae-f39ff6d35922@lab.ntt.co.jp

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/258cef12540fa1cb244881a0f019cefd698c809e

Modified Files
--------------
src/backend/catalog/heap.c | 30 +++++++++++++++++-------------
src/backend/commands/tablecmds.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2017-04-11 13:35:54 pgsql: Remove symbol WIN32_ONLY_COMPILER
Previous Message Tom Lane 2017-04-11 12:59:48 pgsql: Fix pgbench's --progress-timestamp option to print Unix-epoch ti