From cddca5ec13d27017281422124cae0480cddfb663 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 15 Dec 2009 04:57:48 +0000 Subject: Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics. This patch also removes buffer-usage statistics from the track_counts output, since this (or the global server statistics) is deemed to be a better interface to this information. Itagaki Takahiro, reviewed by Euler Taveira de Oliveira. --- src/backend/executor/execMain.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/backend/executor/execMain.c') diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index ebb6d8ea82c..25d26f84468 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,7 +26,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.337 2009/12/11 18:14:43 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.338 2009/12/15 04:57:47 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -180,7 +180,7 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags) */ estate->es_snapshot = RegisterSnapshot(queryDesc->snapshot); estate->es_crosscheck_snapshot = RegisterSnapshot(queryDesc->crosscheck_snapshot); - estate->es_instrument = queryDesc->doInstrument; + estate->es_instrument = queryDesc->instrument_options; /* * Initialize the plan state tree @@ -859,7 +859,7 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, CmdType operation, - bool doInstrument) + int instrument_options) { /* * Check valid relkind ... parser and/or planner should have noticed this @@ -914,10 +914,8 @@ InitResultRelInfo(ResultRelInfo *resultRelInfo, palloc0(n * sizeof(FmgrInfo)); resultRelInfo->ri_TrigWhenExprs = (List **) palloc0(n * sizeof(List *)); - if (doInstrument) - resultRelInfo->ri_TrigInstrument = InstrAlloc(n); - else - resultRelInfo->ri_TrigInstrument = NULL; + if (instrument_options) + resultRelInfo->ri_TrigInstrument = InstrAlloc(n, instrument_options); } else { -- cgit v1.2.3