postgresql/src
Michael Paquier f4694e0f35 Fix some gaps in pg_stat_io with WAL receiver and WAL summarizer
The WAL receiver and WAL summarizer processes gain each one a call to
pgstat_report_wal(), to make sure that they report their WAL statistics
to pgstats, gathering data for pg_stat_io.

In the WAL receiver, the stats reports are timed with status updates sent
to the primary, that depend on wal_receiver_status_interval and
wal_receiver_timeout.  This is a conservative choice, but perhaps we
could be more aggressive with the frequency of the stats reports.  An
interesting historical fact is that the WAL receiver does writes and
syncs of WAL, but it has never reported its statistics to pgstats in
pg_stat_wal.

In the WAL summarizer, the stats reports are done each time the process
waits for WAL.

While on it, pg_stat_io is adjusted so as these two processes do not
report any rows when IOObject is not WAL, making the view easier to use
with less rows.

Two tests are added in TAP, checking statistics for the WAL summarizer
and the WAL receiver.  Status updates in the WAL receiver are currently
possible in the recovery test 001_stream_rep.pl.

Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/Z8UKZyVSHUUQJHNb@paquier.xyz
2025-03-05 10:17:39 +09:00
..
backend Fix some gaps in pg_stat_io with WAL receiver and WAL summarizer 2025-03-05 10:17:39 +09:00
bin Fix some gaps in pg_stat_io with WAL receiver and WAL summarizer 2025-03-05 10:17:39 +09:00
common Change relpath() et al to return path by value 2025-02-25 09:02:07 -05:00
fe_utils Get rid of O(N^2) script-parsing overhead in pgbench. 2025-02-27 10:53:38 -05:00
include Make FP_LOCK_SLOTS_PER_BACKEND look like a function 2025-03-04 18:33:12 +01:00
interfaces Add .gitignore entry for ecpg test detritus. 2025-03-04 12:58:07 -05:00
makefiles Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
pl Allow => syntax for named cursor arguments in plpgsql. 2025-03-03 18:00:13 -05:00
port Fix pg_strtof() to not crash on NULL endptr. 2025-03-01 14:22:56 -05:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Fix some gaps in pg_stat_io with WAL receiver and WAL summarizer 2025-03-05 10:17:39 +09:00
timezone Update time zone data files to tzdata release 2025a. 2025-01-20 16:49:15 -05:00
tools Compress TID lists when writing GIN tuples to disk 2025-03-04 19:02:05 +01:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00