Re: Statistics updates is delayed when using `commit and chain`

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Statistics updates is delayed when using `commit and chain`
Дата
Msg-id 1845220.1659372203@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Statistics updates is delayed when using `commit and chain`  (Andres Freund <andres@anarazel.de>)
Ответы Re: Statistics updates is delayed when using `commit and chain`  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> On 2022-08-01 12:25:58 -0400, Tom Lane wrote:
>> What I suggested a few days ago is that it should be in CommitTransaction.

> I wonder how we'd best deal with the idle timer if we go for that. That only
> makes sense in some contexts (normal backends), but not others (everything
> else).

Yeah.  I think we'd need to get rid of the "bool force" argument
of pgstat_report_stat, and instead have it manage things internally
based on understanding whether the current process uses a reporting
timeout timer or not (if not, always send the report right away).
That seems like it'd be more robust than the current mechanism anyway,
as we're currently relying on every call site to get that right.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Statistics updates is delayed when using `commit and chain`
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Statistics updates is delayed when using `commit and chain`