Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf83040c

Browse files
committed
Fix rare assertion failure in parallel hash join.
When a backend runs out of inner tuples to hash, it should detach fromgrow_batch_barrier only after it has flushed all batches to disk andmerged counters, not before. Otherwise a concurrent backend inExecParallelHashIncreaseNumBatches() could stop waiting for thisbackend and try to read tuples before they have been written. Thiscommit reorders those operations and should fix the assertion failuresseen occasionally on the build farm since commit1804284.Author: Thomas MunroDiscussion:https://postgr.es/m/E1eRwXy-0004IK-TO%40gemulon.postgresql.org
1 parentbe23432 commitf83040c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/executor/nodeHash.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,6 @@ MultiExecParallelHash(HashState *node)
288288
ExecParallelHashTableInsert(hashtable,slot,hashvalue);
289289
hashtable->partialTuples++;
290290
}
291-
BarrierDetach(&pstate->grow_buckets_barrier);
292-
BarrierDetach(&pstate->grow_batches_barrier);
293291

294292
/*
295293
* Make sure that any tuples we wrote to disk are visible to
@@ -304,6 +302,9 @@ MultiExecParallelHash(HashState *node)
304302
*/
305303
ExecParallelHashMergeCounters(hashtable);
306304

305+
BarrierDetach(&pstate->grow_buckets_barrier);
306+
BarrierDetach(&pstate->grow_batches_barrier);
307+
307308
/*
308309
* Wait for everyone to finish building and flushing files and
309310
* counters.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp