From 2421e9a51d20bb83154e54a16ce628f9249fa907 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 24 Feb 2025 09:51:56 +0900 Subject: Remove read/sync fields from pg_stat_wal and GUC track_wal_io_timing The four following attributes are removed from pg_stat_wal: * wal_write * wal_sync * wal_write_time * wal_sync_time a051e71e28a1 has added an equivalent of this information in pg_stat_io with more granularity as this now spreads across the backend types, IO context and IO objects. So, keeping the same information in pg_stat_wal has little benefits. Another benefit of this commit is the removal of PendingWalStats, simplifying an upcoming patch to add per-backend WAL statistics, which already support IO statistics and which have access to the write/sync stats data of WAL. The GUC track_wal_io_timing, that was used to enable or disable the aggregation of the write and sync timings for WAL, is also removed. pgstat_prepare_io_time() is simplified. Bump catalog version. Bump PGSTAT_FILE_FORMAT_ID, due to the update of PgStat_WalStats. Author: Bertrand Drouvot Discussion: https://postgr.es/m/Z7RkQ0EfYaqqjgz/@ip-10-97-1-34.eu-west-3.compute.internal --- doc/src/sgml/config.sgml | 22 ---------------- doc/src/sgml/monitoring.sgml | 62 -------------------------------------------- 2 files changed, 84 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 007746a4429..a8354576108 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -8393,28 +8393,6 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; - - track_wal_io_timing (boolean) - - track_wal_io_timing configuration parameter - - - - - Enables timing of WAL I/O calls. This parameter is off by default, - as it will repeatedly query the operating system for the current time, - which may cause significant overhead on some platforms. - You can use the pg_test_timing tool to - measure the overhead of timing on your system. - I/O timing information is - displayed in - pg_stat_wal. - Only superusers and users with the appropriate SET - privilege can change this setting. - - - - track_functions (enum) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index e698e74e116..3dfd059b7ee 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -183,11 +183,6 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser of block read, write, extend, and fsync times. - - The parameter enables monitoring - of WAL write and fsync times. - - Normally these parameters are set in postgresql.conf so that they apply to all server processes, but it is possible to turn @@ -3265,63 +3260,6 @@ description | Waiting for a newly initialized WAL file to reach durable storage - - - wal_write bigint - - - Number of times WAL buffers were written out to disk via - XLogWrite request. - See for more information about - the internal WAL function XLogWrite. - - - - - - wal_sync bigint - - - Number of times WAL files were synced to disk via - issue_xlog_fsync request - (if is on and - is either - fdatasync, fsync or - fsync_writethrough, otherwise zero). - See for more information about - the internal WAL function issue_xlog_fsync. - - - - - - wal_write_time double precision - - - Total amount of time spent writing WAL buffers to disk via - XLogWrite request, in milliseconds - (if is enabled, - otherwise zero). This includes the sync time when - wal_sync_method is either - open_datasync or open_sync. - - - - - - wal_sync_time double precision - - - Total amount of time spent syncing WAL files to disk via - issue_xlog_fsync request, in milliseconds - (if track_wal_io_timing is enabled, - fsync is on, and - wal_sync_method is either - fdatasync, fsync or - fsync_writethrough, otherwise zero). - - - stats_reset timestamp with time zone -- cgit v1.2.3