mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +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:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.132 2009/10/10 01:43:49 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.133 2009/12/15 04:57:47 rhaas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -67,7 +67,7 @@ CreateQueryDesc(PlannedStmt *plannedstmt,
|
||||
Snapshot crosscheck_snapshot,
|
||||
DestReceiver *dest,
|
||||
ParamListInfo params,
|
||||
bool doInstrument)
|
||||
int instrument_options)
|
||||
{
|
||||
QueryDesc *qd = (QueryDesc *) palloc(sizeof(QueryDesc));
|
||||
|
||||
@ -80,7 +80,7 @@ CreateQueryDesc(PlannedStmt *plannedstmt,
|
||||
qd->crosscheck_snapshot = RegisterSnapshot(crosscheck_snapshot);
|
||||
qd->dest = dest; /* output dest */
|
||||
qd->params = params; /* parameter values passed into query */
|
||||
qd->doInstrument = doInstrument; /* instrumentation wanted? */
|
||||
qd->instrument_options = instrument_options; /* instrumentation wanted? */
|
||||
|
||||
/* null these fields until set by ExecutorStart */
|
||||
qd->tupDesc = NULL;
|
||||
@ -111,7 +111,7 @@ CreateUtilityQueryDesc(Node *utilitystmt,
|
||||
qd->crosscheck_snapshot = InvalidSnapshot; /* RI check snapshot */
|
||||
qd->dest = dest; /* output dest */
|
||||
qd->params = params; /* parameter values passed into query */
|
||||
qd->doInstrument = false; /* uninteresting for utilities */
|
||||
qd->instrument_options = false; /* uninteresting for utilities */
|
||||
|
||||
/* null these fields until set by ExecutorStart */
|
||||
qd->tupDesc = NULL;
|
||||
@ -178,7 +178,7 @@ ProcessQuery(PlannedStmt *plan,
|
||||
*/
|
||||
queryDesc = CreateQueryDesc(plan, sourceText,
|
||||
GetActiveSnapshot(), InvalidSnapshot,
|
||||
dest, params, false);
|
||||
dest, params, 0);
|
||||
|
||||
/*
|
||||
* Set up to collect AFTER triggers
|
||||
@ -515,7 +515,7 @@ PortalStart(Portal portal, ParamListInfo params, Snapshot snapshot)
|
||||
InvalidSnapshot,
|
||||
None_Receiver,
|
||||
params,
|
||||
false);
|
||||
0);
|
||||
|
||||
/*
|
||||
* We do *not* call AfterTriggerBeginQuery() here. We assume
|
||||
|
Reference in New Issue
Block a user