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

From Thomas Munro
Subject Re: pgsql: Handle lack of DSM slots in parallel btree build.
Date
Msg-id CA+hUKGLxupzmv35_Yz_0PKgKJY_S5aqff7xOrkvh_CCzKM8mnA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Handle lack of DSM slots in parallel btree build.  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: pgsql: Handle lack of DSM slots in parallel btree build.  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-committers
Hi Peter,

On Tue, Feb 4, 2020 at 9:13 AM Peter Geoghegan <pg@bowt.ie> wrote:
> On Thu, Jan 30, 2020 at 2:34 PM Thomas Munro <tmunro@postgresql.org> wrote:
> > 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.
>
> Uh, this seems to have completely disabled parallel index builds on
> the master branch.

Oops.  The check needs to move down below InitializeParallelDSM(), and
release any extra resources that might have been acquired (snapshot?).
I will do some testing in a few hours and post a fix.



pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: pgsql: Handle lack of DSM slots in parallel btree build.
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Add missing break out seqscan loop in logical replication