Re: Parallel index creation does not properly cleanup after error - Mailing list pgsql-hackers

From David Rowley
Subject Re: Parallel index creation does not properly cleanup after error
Date
Msg-id CAKJS1f8ZEdNvoEwJXYPPp0KWbopeph6mwS6wv0ansRuf4S=+qQ@mail.gmail.com
Whole thread Raw
In response to Re: Parallel index creation does not properly cleanup after error  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Parallel index creation does not properly cleanup after error  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On 12 March 2018 at 08:41, Peter Geoghegan <pg@bowt.ie> wrote:
> On Sun, Mar 11, 2018 at 3:22 AM, David Rowley
>> A perhaps simple fix would be just to have ResetReindexPending() only
>> reset the list to NIL again and not try to raise any error.
>
> I noticed a very similar bug in ResetReindexProcessing() just before
> parallel CREATE INDEX was committed. The fix there was simply not
> throwing a "can't happen" error. I agree that the same fix should be
> used here. It's not worth enforcing !IsInParallelMode() in the reset
> functions; just enforcing !IsInParallelMode() in the set functions is
> sufficient. Attached patch does this.

Thanks for putting the patch together. Although in regards to your
proposed commit message in the patch, I'd disagree with me having just
reported it. I also investigated it and suggested a fix, which happens
to be exactly the fix you've used in the patch.

I've added this to the open items list for PG11.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Ildus Kurbangaliev
Date:
Subject: Re: committing inside cursor loop
Next
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] GUC for cleanup indexes threshold.