aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 50f2f7f2465..ef8fb20429c 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -695,6 +695,8 @@ pg_analyze_and_rewrite_params(RawStmt *parsetree,
free_parsestate(pstate);
+ pgstat_report_queryid(query->queryId, false);
+
if (log_parser_stats)
ShowUsage("PARSE ANALYSIS STATISTICS");
@@ -913,6 +915,7 @@ pg_plan_queries(List *querytrees, const char *query_string, int cursorOptions,
stmt->utilityStmt = query->utilityStmt;
stmt->stmt_location = query->stmt_location;
stmt->stmt_len = query->stmt_len;
+ stmt->queryId = query->queryId;
}
else
{
@@ -1029,6 +1032,8 @@ exec_simple_query(const char *query_string)
DestReceiver *receiver;
int16 format;
+ pgstat_report_queryid(0, true);
+
/*
* Get the command name for use in status display (it also becomes the
* default completion tag, down inside PortalRun). Set ps_status and