Don't lock tables in RelationGetPartitionDispatchInfo.
Robert Haas <rhaas@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/partition.c | modified | +29 −26 |
| src/backend/executor/execMain.c | modified | +7 −3 |
| src/include/catalog/partition.h | modified | +1 −2 |
Discussion
- expanding inheritance in partition bound order 70 messages · 2017-08-04 → 2017-09-15