Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd7cbeaf

Browse files
committed
Remove pgstat_flush_wal()
All the processes that generate WAL should call pgstat_report_wal() toreport all their statistics related to WAL, and this is already whathappens in the tree. Keeping pgstat_report_wal() is confusing while theother routine is encouraged.This routine is not required sincefc415ed, where it was lastlyused in pgstat_report_stat() before an equivalent callback existed.Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/Z71oPkJJICrRB5Ws@paquier.xyz
1 parente117cfb commitd7cbeaf

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

‎src/backend/utils/activity/pgstat_wal.c‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pgstat_report_wal(bool force)
5151
nowait= !force;
5252

5353
/* flush wal stats */
54-
pgstat_flush_wal(nowait);
54+
(void)pgstat_wal_flush_cb(nowait);
5555

5656
/* flush IO stats */
5757
pgstat_flush_io(nowait);
@@ -69,15 +69,6 @@ pgstat_fetch_stat_wal(void)
6969
return&pgStatLocal.snapshot.wal;
7070
}
7171

72-
/*
73-
* Simple wrapper of pgstat_wal_flush_cb()
74-
*/
75-
void
76-
pgstat_flush_wal(boolnowait)
77-
{
78-
(void)pgstat_wal_flush_cb(nowait);
79-
}
80-
8172
/*
8273
* Calculate how much WAL usage counters have increased by subtracting the
8374
* previous counters from the current ones.

‎src/include/utils/pgstat_internal.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,6 @@ extern void pgstat_slru_snapshot_cb(void);
748748
* Functions in pgstat_wal.c
749749
*/
750750

751-
externvoidpgstat_flush_wal(boolnowait);
752-
753751
externvoidpgstat_wal_init_backend_cb(void);
754752
externboolpgstat_wal_have_pending_cb(void);
755753
externboolpgstat_wal_flush_cb(boolnowait);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp