Re: Slow standby snapshot

Поиск
Список
Период
Сортировка
От Michail Nikolaev
Тема Re: Slow standby snapshot
Дата
Msg-id CANtu0ohnft26vSQ-Nnd9DuVgFOyNzxG7MRQVSeXhreMH0fh7iw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Slow standby snapshot  (Andrey Borodin <x4mmm@yandex-team.ru>)
Ответы Re: Slow standby snapshot  (Michail Nikolaev <michail.nikolaev@gmail.com>)
Re: Slow standby snapshot  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
Hello, Andrey.

Thanks for your feedback.

> Current patch addresses another problem. In presence of old enough transaction enumeration of KnownAssignedXids with
sharedlock prevents adding new transactions with exclusive lock. And recovery effectively pauses.
 

Actually, I see two problems here (caused by the presence of old long
transactions). The first one is lock contention which causes recovery
pauses. The second one - just high CPU usage on standby by
KnownAssignedXidsGetAndSetXmin.

> All in all, I think using proposed "KnownAssignedXidsNext" patch solves real problem and the problem of binary
searchesshould be addressed by compressing KnownAssignedXids more often.
 

I updated the patch a little. KnownAssignedXidsGetAndSetXmin now
causes fewer cache misses because some values are stored in variables
(registers). I think it is better to not lean on the compiler here
because of `volatile` args.
Also, I have added some comments.

Best regards,
Michail.

Вложения

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

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: 2021-11-11 release announcement draft
Следующее
От: Joshua Brindle
Дата:
Сообщение: Re: Support for NSS as a libpq TLS backend