Fwd: [BUG]: the walsender does not update its IO statistics until it exits
От | Xuneng Zhou |
---|---|
Тема | Fwd: [BUG]: the walsender does not update its IO statistics until it exits |
Дата | |
Msg-id | CABPTF7Vf_j7Eb1F3wuaFHr6r6m2_4imVzSKCYPkciN+Ti2eR2w@mail.gmail.com обсуждение исходный текст |
Ответ на | [BUG]: the walsender does not update its IO statistics until it exits (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>) |
Ответы |
Re: Fwd: [BUG]: the walsender does not update its IO statistics until it exits
|
Список | pgsql-hackers |
Sorry, forgot to cc this one too.
I am curious about the reason for this:
---------- Forwarded message ---------
发件人: Xuneng Zhou <xunengzhou@gmail.com>
Date: 2025年3月13日周四 19:29
Subject: Re: [BUG]: the walsender does not update its IO statistics until it exits
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
发件人: Xuneng Zhou <xunengzhou@gmail.com>
Date: 2025年3月13日周四 19:29
Subject: Re: [BUG]: the walsender does not update its IO statistics until it exits
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Hi,
Given that PGSTAT_MIN_INTERVAL is the go-to setting for stats flushes
* Unless called with 'force', pending stats updates are flushed happen once
* per PGSTAT_MIN_INTERVAL (1000ms). When not forced, stats flushes do not
* block on lock acquisition, except if stats updates have been pending for
* longer than PGSTAT_MAX_INTERVAL (60000ms).
*
* Whenever pending stats updates remain at the end of pgstat_report_stat() a
* suggested idle timeout is returned. Currently this is always
* PGSTAT_IDLE_INTERVAL (10000ms). Callers can use the returned time to set up
* a timeout after which to call pgstat_report_stat(true), but are not
* required to do so.
Given that PGSTAT_MIN_INTERVAL is the go-to setting for stats flushes
* Unless called with 'force', pending stats updates are flushed happen once
* per PGSTAT_MIN_INTERVAL (1000ms). When not forced, stats flushes do not
* block on lock acquisition, except if stats updates have been pending for
* longer than PGSTAT_MAX_INTERVAL (60000ms).
*
* Whenever pending stats updates remain at the end of pgstat_report_stat() a
* suggested idle timeout is returned. Currently this is always
* PGSTAT_IDLE_INTERVAL (10000ms). Callers can use the returned time to set up
* a timeout after which to call pgstat_report_stat(true), but are not
* required to do so.
I am curious about the reason for this:
1. maybe relying on PGSTAT_IDLE_INTERVAL would make more sense? In both case
PGSTAT_MIN_INTERVAL or PGSTAT_MIN_INTERVAL, I'm not sure there is a need to
update the related doc.
PGSTAT_IDLE_INTERVAL seems to reduce the frequency even more.
With the attached in place, the number of times the stats are being flushed
reduce drastically but still seems enough to get an accurate idea of the walsender
IO activity. Thoughts?
В списке pgsql-hackers по дате отправления: