1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Pass the source text for a parallel query to the workers.

With this change, you can see the query that a parallel worker is
executing in pg_stat_activity, and if the worker crashes you can
see what query it was executing when it crashed.

Rafia Sabih, reviewed by Kuntal Ghosh and Amit Kapila and slightly
revised by me.
This commit is contained in:
Robert Haas
2017-02-22 12:15:17 +05:30
parent b4316928d5
commit 4c728f3829
4 changed files with 29 additions and 1 deletions

View File

@ -190,6 +190,8 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
estate->es_param_exec_vals = (ParamExecData *)
palloc0(queryDesc->plannedstmt->nParamExec * sizeof(ParamExecData));
estate->es_sourceText = queryDesc->sourceText;
/*
* If non-read-only query, set the command ID to mark output tuples with
*/