mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Fix EXPLAIN ANALYZE output for Parallel Hash.
In a race case, EXPLAIN ANALYZE could fail to display correct nbatch and size information. Refactor so that participants report only on batches they worked on rather than trying to report on all of them, and teach explain.c to consider the HashInstrumentation object from all participants instead of picking the first one it can find. This should fix an occasional build farm failure in the "join" regression test. Author: Thomas Munro Reviewed-By: Andres Freund Discussion: https://postgr.es/m/30219.1514428346%40sss.pgh.pa.us
This commit is contained in:
@@ -1186,12 +1186,6 @@ ExecParallelHashJoinNewBatch(HashJoinState *hjstate)
|
||||
* remain).
|
||||
*/
|
||||
BarrierDetach(batch_barrier);
|
||||
|
||||
/*
|
||||
* We didn't work on this batch, but we need to observe
|
||||
* its size for EXPLAIN.
|
||||
*/
|
||||
ExecParallelHashUpdateSpacePeak(hashtable, batchno);
|
||||
hashtable->batches[batchno].done = true;
|
||||
hashtable->curbatch = -1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user