From b287df70e4080350aa471ecca428be145581dd4d Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 9 Dec 2015 13:18:09 -0500 Subject: 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. --- src/include/executor/instrument.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include/executor') 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); -- cgit v1.2.3