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

Commitfc0f3b4

Browse files
committed
Fix parallel sort, broken by the balanced merge patch.
The code for initializing the tapes on each merge iteration was skippedin a parallel worker. I put the !WORKER(state) check in wrong place whilerebasing the patch.That caused failures in the index build in 'multiple-row-versions'isolation test, in multiple buildfarm members. On my laptop it was easierto reproduce by building an index on a larger table, so that you got aparallel sort more reliably.
1 parentaa3ac64 commitfc0f3b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/utils/sort/tuplesort.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2923,7 +2923,7 @@ mergeruns(Tuplesortstate *state)
29232923
* Rewind all the output tapes, and make them inputs for the next
29242924
* pass.
29252925
*/
2926-
if (state->nInputRuns==0&& !WORKER(state))
2926+
if (state->nInputRuns==0)
29272927
{
29282928
int64input_buffer_size;
29292929

@@ -2975,7 +2975,8 @@ mergeruns(Tuplesortstate *state)
29752975
* sorted tape, we can stop at this point and do the final merge
29762976
* on-the-fly.
29772977
*/
2978-
if (!state->randomAccess&&state->nInputRuns <=state->nInputTapes)
2978+
if (!state->randomAccess&&state->nInputRuns <=state->nInputTapes
2979+
&& !WORKER(state))
29792980
{
29802981
/* Tell logtape.c we won't be writing anymore */
29812982
LogicalTapeSetForgetFreeSpace(state->tapeset);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp