mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +03:00
Fix log_executor_stats for non-multi queries. Backpatch to 7.4.X.
This commit is contained in:
parent
ea41a8cc5f
commit
4a6bf72c65
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.73 2003/09/25 18:58:35 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.73.2.1 2004/03/05 00:21:51 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -406,6 +406,17 @@ PortalRun(Portal portal, long count,
|
||||
if (completionTag)
|
||||
completionTag[0] = '\0';
|
||||
|
||||
if (portal->strategy != PORTAL_MULTI_QUERY)
|
||||
{
|
||||
ereport(DEBUG3,
|
||||
(errmsg_internal("PortalRun")));
|
||||
/* PORTAL_MULTI_QUERY logs its own stats per query */
|
||||
if (log_executor_stats)
|
||||
ResetUsage();
|
||||
}
|
||||
|
||||
if (log_executor_stats && portal->strategy != PORTAL_MULTI_QUERY)
|
||||
|
||||
/*
|
||||
* Check for improper portal use, and mark portal active.
|
||||
*/
|
||||
@ -500,6 +511,9 @@ PortalRun(Portal portal, long count,
|
||||
PortalContext = savePortalContext;
|
||||
QueryContext = saveQueryContext;
|
||||
|
||||
if (log_executor_stats && portal->strategy != PORTAL_MULTI_QUERY)
|
||||
ShowUsage("EXECUTOR STATISTICS");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user