1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-24 10:47:04 +03:00

Remove pgstat_flush_wal()

All the processes that generate WAL should call pgstat_report_wal() to
report all their statistics related to WAL, and this is already what
happens in the tree.  Keeping pgstat_report_wal() is confusing while the
other routine is encouraged.

This routine is not required since fc415edf8ca8, where it was lastly
used in pgstat_report_stat() before an equivalent callback existed.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/Z71oPkJJICrRB5Ws@paquier.xyz
This commit is contained in:
Michael Paquier 2025-02-26 15:29:51 +09:00
parent e117cfb2f6
commit d7cbeaf261
2 changed files with 1 additions and 12 deletions

View File

@ -51,7 +51,7 @@ pgstat_report_wal(bool force)
nowait = !force; nowait = !force;
/* flush wal stats */ /* flush wal stats */
pgstat_flush_wal(nowait); (void) pgstat_wal_flush_cb(nowait);
/* flush IO stats */ /* flush IO stats */
pgstat_flush_io(nowait); pgstat_flush_io(nowait);
@ -69,15 +69,6 @@ pgstat_fetch_stat_wal(void)
return &pgStatLocal.snapshot.wal; return &pgStatLocal.snapshot.wal;
} }
/*
* Simple wrapper of pgstat_wal_flush_cb()
*/
void
pgstat_flush_wal(bool nowait)
{
(void) pgstat_wal_flush_cb(nowait);
}
/* /*
* Calculate how much WAL usage counters have increased by subtracting the * Calculate how much WAL usage counters have increased by subtracting the
* previous counters from the current ones. * previous counters from the current ones.

View File

@ -748,8 +748,6 @@ extern void pgstat_slru_snapshot_cb(void);
* Functions in pgstat_wal.c * Functions in pgstat_wal.c
*/ */
extern void pgstat_flush_wal(bool nowait);
extern void pgstat_wal_init_backend_cb(void); extern void pgstat_wal_init_backend_cb(void);
extern bool pgstat_wal_have_pending_cb(void); extern bool pgstat_wal_have_pending_cb(void);
extern bool pgstat_wal_flush_cb(bool nowait); extern bool pgstat_wal_flush_cb(bool nowait);