Skip to content

Commit aec58c7

Browse files
committed
Fix: Init missing PlannedStmt fields in orca
Those fields are missed by orca which are needed by the pg_stat_statements to identify the query. Without initialization of those fields, pg_stat_statements won't track those queries.
1 parent 362763d commit aec58c7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Submodule googlebench updated 109 files

src/backend/optimizer/plan/orca.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,10 @@ optimize_query(Query *parse, int cursorOptions, ParamListInfo boundParams, Optim
405405
result->oneoffPlan = glob->oneoffPlan;
406406
result->transientPlan = glob->transientPlan;
407407

408+
result->queryId = parse->queryId;
409+
result->stmt_location = parse->stmt_location;
410+
result->stmt_len = parse->stmt_len;
411+
408412
return result;
409413
}
410414

0 commit comments

Comments
 (0)