mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
Flush WAL stats in bgwriter
bgwriter can write out WAL, but did not flush the WAL pgstat counters, so the writes were not seen in pg_stat_wal. Back-patch to v14, where pg_stat_wal was introduced. Author: Nazir Bilal Yavuz Reviewed-by: Matthias van de Meent, Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/CAN55FZ2FPYngovZstr%3D3w1KSEHe6toiZwrurbhspfkXe5UDocg%40mail.gmail.com
This commit is contained in:
parent
cf12c4fd29
commit
594001864a
@ -247,6 +247,7 @@ BackgroundWriterMain(void)
|
|||||||
* Send off activity statistics to the stats collector
|
* Send off activity statistics to the stats collector
|
||||||
*/
|
*/
|
||||||
pgstat_send_bgwriter();
|
pgstat_send_bgwriter();
|
||||||
|
pgstat_send_wal(true);
|
||||||
|
|
||||||
if (FirstCallSinceLastCheckpoint())
|
if (FirstCallSinceLastCheckpoint())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user