Re: Locks release order in LogStandbySnapshot

Поиск
Список
Период
Сортировка
От Japin Li
Тема Re: Locks release order in LogStandbySnapshot
Дата
Msg-id MEYP282MB1669EBEAB83DCCBE878B68DAB63E9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на Re: Locks release order in LogStandbySnapshot  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Wed, 09 Nov 2022 at 11:21, Andres Freund <andres@anarazel.de> wrote:
> I think it does. If we allow xid assignment before LogCurrentRunningXacts() is
> done, those new xids would not have been mentioned in the xl_running_xacts
> record, despite already running. Which I think result in corrupted snapshots
> during hot standby and logical decoding.
>
>
>> Does there any sense to release them in reversed acquisition order in
>> LogStandbySnapshot like ProcArrayRemove?
>
> I don't think it's worth optimizing for, this happens at a low frequency
> (whereas connection establishment can be very frequent). And due to the above,
> we can sometimes release ProcArrayLock earlier.
>

Thanks for the explanation!  Got it.

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



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

Предыдущее
От: Andrey Borodin
Дата:
Сообщение: Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: User functions for building SCRAM secrets