Handle lack of DSM slots in parallel btree build, take 2.
authorThomas Munro <tmunro@postgresql.org>
Tue, 4 Feb 2020 23:21:03 +0000 (12:21 +1300)
committerThomas Munro <tmunro@postgresql.org>
Tue, 4 Feb 2020 23:27:00 +0000 (12:27 +1300)
commitd9fe702a2c9843af71419ad0df069859e5581694
treec2f83eefe58210cf566c61d3f9b12a0d084ecb6d
parent7d91b604d9b5d6ec8c19c57a9ffd2f27129cdd94
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
src/backend/access/nbtree/nbtsort.c