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:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user