pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Don't lock tables in RelationGetPartitionDispatchInfo.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Don't lock tables in RelationGetPartitionDispatchInfo.
@ 2017-08-17 19:49  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2017-08-17 19:49 UTC (permalink / raw)
  To: 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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/54cde0c4c05807321d3f4bf96a97c376e3fa91cb

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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Don't lock tables in RelationGetPartitionDispatchInfo.
@ 2017-08-17 19:49  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2017-08-17 19:49 UTC (permalink / raw)
  To: 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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-08-17 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 19:49 pgsql: Don't lock tables in RelationGetPartitionDispatchInfo. Robert Haas <rhaas@postgresql.org>
2017-08-17 19:49 pgsql: Don't lock tables in RelationGetPartitionDispatchInfo. Robert Haas <rhaas@postgresql.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