From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | wangchuanting <wangchuanting(at)huawei(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Re: BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog |
Date: | 2017-06-14 15:35:10 |
Message-ID: | 20170614153510.l57n2dgr3ukkgla4@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Michael Paquier wrote:
> On Wed, Jun 14, 2017 at 8:08 AM, Alvaro Herrera
> <alvherre(at)2ndquadrant(dot)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.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2017-06-14 16:43:29 | Re: BUG #14662: 'has_table_privilege()' function fails with error, "invalid name syntax" when using Japanese symbols |
Previous Message | r.e.vijaykumar | 2017-06-14 08:02:42 | BUG #14705: PgAdmin 4 Database Backup Issue |
From | Date | Subject | |
---|---|---|---|
Next Message | Ants Aasma | 2017-06-14 15:41:43 | Re: WIP: Data at rest encryption |
Previous Message | Bruce Momjian | 2017-06-14 15:26:03 | Re: WIP: Data at rest encryption |