aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-12-09 13:18:09 -0500
committerRobert Haas <rhaas@postgresql.org>2015-12-09 13:21:19 -0500
commitb287df70e4080350aa471ecca428be145581dd4d (patch)
tree10f57a8c7d1029fa1c1b7caabf24ce0925f23b07 /src/include/executor
parent25c539233044c235e97fd7c9dc600fb5f08fe065 (diff)
downloadpostgresql-b287df70e4080350aa471ecca428be145581dd4d.tar.gz
postgresql-b287df70e4080350aa471ecca428be145581dd4d.zip
Allow EXPLAIN (ANALYZE, VERBOSE) to display per-worker statistics.
The original parallel sequential scan commit included only very limited changes to the EXPLAIN output. Aggregated totals from all workers were displayed, but there was no way to see what each individual worker did or to distinguish the effort made by the workers from the effort made by the leader. Per a gripe by Thom Brown (and maybe others). Patch by me, reviewed by Amit Kapila.
Diffstat (limited to 'src/include/executor')
-rw-r--r--src/include/executor/instrument.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h
index f28e56ce48c..52d3c818282 100644
--- a/src/include/executor/instrument.h
+++ b/src/include/executor/instrument.h
@@ -63,6 +63,12 @@ typedef struct Instrumentation
BufferUsage bufusage; /* Total buffer usage */
} Instrumentation;
+typedef struct WorkerInstrumentation
+{
+ int num_workers; /* # of structures that follow */
+ Instrumentation instrument[FLEXIBLE_ARRAY_MEMBER];
+} WorkerInstrumentation;
+
extern PGDLLIMPORT BufferUsage pgBufferUsage;
extern Instrumentation *InstrAlloc(int n, int instrument_options);