From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Don't lock tables in RelationGetPartitionDispatchInfo. |
Date: | 2017-08-17 19:49:37 |
Message-ID: | E1diQnR-0004Pc-1J@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Don't lock tables in RelationGetPartitionDispatchInfo.
Instead, lock them in the caller using find_all_inheritors so that
they get locked in the standard order, minimizing deadlock risks.
Also in RelationGetPartitionDispatchInfo, avoid opening tables which
are not partitioned; there's no need.
Amit Langote, reviewed by Ashutosh Bapat and Amit Khandekar
Discussion: http://postgr.es/m/91b36fa1-c197-b72f-ca6e-56c593bae68c@lab.ntt.co.jp
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/7c0ca2900f7cae490fd551096cb7dc581cfe45c8
Modified Files
--------------
src/backend/catalog/partition.c | 55 ++++++++++++++++++++++-------------------
src/backend/executor/execMain.c | 10 +++++---
src/include/catalog/partition.h | 3 +--
3 files changed, 37 insertions(+), 31 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-08-17 22:36:28 | pgsql: Temporarily revert test case from a2b70c89ca1a5fcf6181d3c777d82e |
Previous Message | Robert Haas | 2017-08-17 18:55:47 | pgsql: Refactor validation of new partitions a little bit. |