mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
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.
This commit is contained in:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user