Handle lack of DSM slots in parallel btree build, take 2.

Thomas Munro <tmunro@postgresql.org>

Commit: 2e2351bd6c45a77b6462bf73102b5735a4e21379
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2020-02-04T23:28:33Z
Releases: 12.2
Handle lack of DSM slots in parallel btree build, take 2.

Commit 74618e77 added a new check intended to fix a bug, but put
it in the wrong place so that parallel btree build was always
disabled.  Do the check after we've actually tried to create
a DSM segment.  Back-patch to 11, like the earlier commit.

Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAH2-WzmDABkJzrNnvf%2BOULK-_A_j9gkYg_Dz-H62jzNv4eKQTw%40mail.gmail.com

Files

PathChange+/−
src/backend/access/nbtree/nbtsort.c modified +10 −8

Discussion

Cited messages not in the archive: CAH2-WzmDABkJzrNnvf+OULK-_A_j9gkYg_Dz-H62jzNv4eKQTw@mail.gmail.com