pgsql: Handle lack of DSM slots in parallel btree build. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: Handle lack of DSM slots in parallel btree build.
Date
Msg-id E1ixINt-0001nc-0L@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Handle lack of DSM slots in parallel btree build.
List pgsql-committers
Handle lack of DSM slots in parallel btree build.

If no DSM slots are available, a ParallelContext can still be
created, but its seg pointer is NULL.  Teach parallel btree build
to cope with that by falling back to a regular non-parallel build,
to avoid crashing with a segmentation fault.

Back-patch to 11, where parallel CREATE INDEX landed.

Reported-by: Nicola Contu
Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/CA%2BhUKGJgJEBnkuODBVomyK3MWFvDBbMVj%3Dgdt6DnRPU-5sQ6UQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/74618e77b43cfce670b4725d5b9a300a2afd12d1

Modified Files
--------------
src/backend/access/nbtree/nbtsort.c | 9 +++++++++
1 file changed, 9 insertions(+)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Add reusable routine for making arrays unique.
Next
From: Thomas Munro
Date:
Subject: pgsql: Handle lack of DSM slots in parallel btree build.