Fix parallel sort, broken by the balanced merge patch.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: fc0f3b4cb0e882a9c5d51c302d4aa3591e4f80fd
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2021-10-18T17:42:10Z
Releases: 15.0
Fix parallel sort, broken by the balanced merge patch.

The code for initializing the tapes on each merge iteration was skipped
in a parallel worker. I put the !WORKER(state) check in wrong place while
rebasing the patch.

That caused failures in the index build in 'multiple-row-versions'
isolation test, in multiple buildfarm members. On my laptop it was easier
to reproduce by building an index on a larger table, so that you got a
parallel sort more reliably.

Files

PathChange+/−
src/backend/utils/sort/tuplesort.c modified +3 −2