Re: old_snapshot_threshold bottleneck on replica

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: old_snapshot_threshold bottleneck on replica
Дата
Msg-id CA+TgmoboYmfYMnqtWgyE_1Jy9DYE_VE8HYiX3f1EoO=Wpx2VOQ@mail.gmail.com
обсуждение исходный текст
Ответ на old_snapshot_threshold bottleneck on replica  (Maxim Orlov <orlovmg@gmail.com>)
Ответы Re: old_snapshot_threshold bottleneck on replica
Re: old_snapshot_threshold bottleneck on replica
Список pgsql-hackers
On Mon, Jan 23, 2023 at 9:40 AM Maxim Orlov <orlovmg@gmail.com> wrote:
> One of our customers stumble onto a significant performance degradation while running multiple OLAP-like queries on a
replica.
> After some investigation, it became clear that the problem is in accessing old_snapshot_threshold parameter.

It has been suggested that we remove that feature entirely.

> My proposal is to use atomic for threshold_timestamp and threshold_xid. PFA 0001 patch.

This patch changes threshold_timestamp and threshold_xid to use
atomics, but it does not remove mutex_threshold which, according to a
quick glance at the comments, protects exactly those two fields. So,
either:

(1) that mutex also protects something else and the existing comment
is wrong, or

(2) the mutex should have been removed but the patch neglected to do so, or

(3) the mutex is still needed for some reason, in which case either
(3a) the patch isn't actually safe or (3b) the patch needs comments to
explain what the new synchronization model is.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgindent vs variable declaration across multiple lines
Следующее
От: gkokolatos@pm.me
Дата:
Сообщение: Re: Add LZ4 compression in pg_dump