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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog
Дата
Msg-id CAB7nPqQnfR5aHr+Qtr2RJiw59yOkcQSrhTto2ZfDqFVn+iGmtw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
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.
-- 
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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [BUGS] Re: BUG #14680: startup process on standby encounter adeadlock of TwoPhaseStateLock when redo 2PC xlog
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [BUGS] BUG #13837: Files in pg_committs not deleted