Fix parallel sort, broken by the balanced merge patch.
authorHeikki Linnakangas <[email protected]>
Mon, 18 Oct 2021 17:42:10 +0000 (20:42 +0300)
committerHeikki Linnakangas <[email protected]>
Mon, 18 Oct 2021 17:42:10 +0000 (20:42 +0300)
commitfc0f3b4cb0e882a9c5d51c302d4aa3591e4f80fd
treeb7ff7cd292094a019d0fd9f8d995902eea2527e2
parentaa3ac6453b28049b3198433b75228271b7612d4a
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.
src/backend/utils/sort/tuplesort.c