pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Handle lack of DSM slots in parallel btree build.
Date: Thu, 30 Jan 2020 22:34:01 +0000
Message-ID: <E1ixINt-0001nc-0L@gemulon.postgresql.org> (raw)

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(+)



view thread (13+ messages)  latest in thread

Message-ID: <E1ixINt-0001nc-0L@gemulon.postgresql.org>
Permalink:  ../E1ixINt-0001nc-0L@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ixINt-0001nc-0L@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Handle lack of DSM slots in parallel btree build.
  In-Reply-To: <E1ixINt-0001nc-0L@gemulon.postgresql.org>
  References: <E1ixINt-0001nc-0L@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox