Re: pgsql: Fix race condition in snapshot caching when 2PC is used.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pgsql: Fix race condition in snapshot caching when 2PC is used.
Дата
Msg-id 20200818235152.4hxyb3hrvcm7pwom@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: pgsql: Fix race condition in snapshot caching when 2PC is used.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Fix race condition in snapshot caching when 2PC is used.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
Hi,

On 2020-08-18 19:43:24 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Fix race condition in snapshot caching when 2PC is used.
> 
> Uh, is it really okay to modify that variable with only shared
> ProcArrayLock?

Uh, you're right.  I assume it'll fix the buildfarm visible issue
regardless, but we surely don't want to rely on that.

I'm inclined to just make ClearTransaction take an exclusive lock - the
rest of the 2PC operations are so heavyweight that I can't imagine
making a difference.  When I tested the locking changes in
ProcArrayAdd()/Remove() the more heavyweight locking wasn't at all
visible.

Greetings,

Andres Freund



В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Fix race condition in snapshot caching when 2PC is used.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Fix race condition in snapshot caching when 2PC is used.