xact_start for walsender & logical decoding not updated

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема xact_start for walsender & logical decoding not updated
Дата
Msg-id 20191209234409.exe7osmyalwkt5j4@development
обсуждение исходный текст
Ответы Re: xact_start for walsender & logical decoding not updated  (Andres Freund <andres@anarazel.de>)
Re: xact_start for walsender & logical decoding not updated  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Hi,

I think there's a minor bug in pg_stat_activity tracking of walsender
processes. The issue is that xact_start is only updated at the very
beginning when the walsender starts (so it's almost exactly equal to
backend_start) and then just flips between NULL and that value.

Reproducing this is trivial - just create a publication/subscription
with the built-in logical replication, and run arbitrary workload.
You'll see that the xact_start value never changes.

I think the right fix is calling SetCurrentStatementStartTimestamp()
right before StartTransactionCommand() in ReorderBufferCommit, per the
attached patch.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: verbose cost estimate
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: verbose cost estimate