Fix interaction of triggers, partitioning, and EXPLAIN ANALYZE.
Robert Haas <rhaas@postgresql.org>
Fix interaction of triggers, partitioning, and EXPLAIN ANALYZE. Add a new EState member es_leaf_result_relations, so that the trigger code knows about ResultRelInfos created by tuple routing. Also make sure ExplainPrintTriggers knows about partition-related ResultRelInfos. Etsuro Fujita, reviewed by Amit Langote Discussion: http://postgr.es/m/57163e18-8e56-da83-337a-22f2c0008051@lab.ntt.co.jp
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/copy.c | modified | +57 −53 |
| src/backend/commands/explain.c | modified | +14 −1 |
| src/backend/executor/execMain.c | modified | +34 −11 |
| src/backend/executor/execUtils.c | modified | +5 −0 |
| src/backend/executor/nodeModifyTable.c | modified | +1 −0 |
| src/include/executor/executor.h | modified | +1 −0 |
| src/include/nodes/execnodes.h | modified | +3 −0 |
Discussion
- Stats for triggers on partitioned tables not shown in EXPLAIN ANALYZE 6 messages · 2017-08-15 → 2017-08-21