Thread: pgsql: Flush WAL stats in bgwriter

pgsql: Flush WAL stats in bgwriter

From
Heikki Linnakangas
Date:
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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4a97a43a73cbdb883b61161df35454696b96b336

Modified Files
--------------
src/backend/postmaster/bgwriter.c | 1 +
1 file changed, 1 insertion(+)