Re: pgsql: Handle lack of DSM slots in parallel btree build.

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Thomas Munro <tmunro(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Handle lack of DSM slots in parallel btree build.
Date: 2020-02-03 21:03:39
Message-ID: CA+hUKGLxupzmv35_Yz_0PKgKJY_S5aqff7xOrkvh_CCzKM8mnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Hi Peter,

On Tue, Feb 4, 2020 at 9:13 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Thu, Jan 30, 2020 at 2:34 PM Thomas Munro <tmunro(at)postgresql(dot)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.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2020-02-03 22:00:44 pgsql: Add missing break out seqscan loop in logical replication
Previous Message Peter Geoghegan 2020-02-03 20:12:54 Re: pgsql: Handle lack of DSM slots in parallel btree build.