PostgreSQL 17: Reset shared statistics at once with pg_stat_reset_shared()
PostgreSQL comes with several catalog views which expose cluster wide statistics. One of them is the new pg_stats_checkpointer view we’ve talked about previously. To reset some of those statistics there is pg_stat_reset_shared(). Beside the pg_stat_checkpointer view, the statistics in pg_stat_bgwriter, pg_stat_io, pg_stat_wal, pg_stat_recovery_prefetch, and pg_stat_archiver can be reset. Before PostgreSQL 17 you had to call this function individually for all…



