git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e117cfb)
Remove pgstat_flush_wal()
2025年2月26日 06:29:51 +0000 (15:29 +0900)
2025年2月26日 06:37:28 +0000 (15:37 +0900)
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


diff --git a/src/backend/utils/activity/pgstat_wal.c b/src/backend/utils/activity/pgstat_wal.c
index 4dc41a4a590e7bb742315e24ccc51f6d0da1cf09..7beee2095a859a7f0695a31a1ad8bbdd4ece8ee2 100644 (file)
--- a/src/backend/utils/activity/pgstat_wal.c
+++ b/src/backend/utils/activity/pgstat_wal.c
@@ -51,7 +51,7 @@ pgstat_report_wal(bool force)
nowait = !force;
/* flush wal stats */
- pgstat_flush_wal(nowait);
+ (void) pgstat_wal_flush_cb(nowait);
/* flush IO stats */
pgstat_flush_io(nowait);
@@ -69,15 +69,6 @@ pgstat_fetch_stat_wal(void)
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
* previous counters from the current ones.
diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h
index 06dcea3f0dcf8d918f0c652e950d02a67c5b8ca9..36d228e3558bc0423c1d42d50536cf6af206efef 100644 (file)
--- a/src/include/utils/pgstat_internal.h
+++ b/src/include/utils/pgstat_internal.h
@@ -748,8 +748,6 @@ extern void pgstat_slru_snapshot_cb(void);
* Functions in pgstat_wal.c
*/
-extern void pgstat_flush_wal(bool nowait);
-
extern void pgstat_wal_init_backend_cb(void);
extern bool pgstat_wal_have_pending_cb(void);
extern bool pgstat_wal_flush_cb(bool nowait);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /