Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog
Date
Msg-id CAB7nPqQyz813gQou30KHZtH98oZh5P=4diyvVtX0eLvWwecTMA@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On Thu, Jun 15, 2017 at 12:35 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Michael Paquier wrote:
>> On Wed, Jun 14, 2017 at 8:08 AM, Alvaro Herrera
>> <alvherre@2ndquadrant.com> wrote:
>> > So I propose that RecoverPreparedTransactions grabs exclusive lock at
>> > the top, and only the bottom part of the loop is done unlocked, which
>> > AFAICS should be safe.  (MarkAsPrepared gained a boolean argument
>> > indicating that caller already holds lock).
>>
>> Logically both approaches are really close as with this approach the
>> additional locked area is when scanning the entries of TwoPhaseState.
>> But I agree that your suggestion would be safer in the long run. This
>> looks good to me after a close look.
>
> Thanks, pushed.

Thanks for the commit.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14662: 'has_table_privilege()' function fails witherror, "invalid name syntax" when using Japanese symbols
Next
From: khuddleston@pivotal.io
Date:
Subject: [BUGS] BUG #14706: Dependencies not recorded properly for base types