From 3015bbc4b6301d87ac7a186e19fa2eec0763b6c8 Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Sun, 9 Mar 2025 13:34:10 +0100 Subject: [PATCH v20250309 5/5] update docs --- doc/src/sgml/monitoring.sgml | 84 ++++++++++++++++++++---------------- doc/src/sgml/wal.sgml | 8 ++-- 2 files changed, 51 insertions(+), 41 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 4a6ef5f1605..2a568ee2357 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6804,8 +6804,8 @@ FROM pg_stat_get_backend_idset() AS backendid; When data checksums are being enabled on a running cluster, the pg_stat_progress_data_checksums view will contain - a row for each background worker which is currently calculating checksums - for the data pages. + a row for the launcher process, and one row for each worker process which + is currently calculating checksums for the data pages in one database. @@ -6837,37 +6837,33 @@ FROM pg_stat_get_backend_idset() AS backendid; - - - phase text - - - Current processing phase, see - for description of the phases. - - + + datid oid + + + OID of this database, or 0 for the launcher process + relation + - - - databases_total integer - - - The total number of databases which will be processed. - - + + datname name + + + Name of this database, or NULL for the + launcher process. + - relations_total integer + phase text - The total number of relations which will be processed, or - NULL if the data checksums worker process hasn't - calculated the number of relations yet. + Current processing phase, see + for description of the phases. @@ -6875,10 +6871,12 @@ FROM pg_stat_get_backend_idset() AS backendid; - databases_processed integer + databases_total integer - The number of databases which have been processed. + The total number of databases which will be processed. Only the + launcher worker has this value set, the other worker processes + have this NULL. @@ -6886,10 +6884,12 @@ FROM pg_stat_get_backend_idset() AS backendid; - relations_processed integer + databases_done integer - The number of relations which have been processed. + The number of databases which have been processed. Only the + launcher worker has this value set, the other worker processes + have this NULL. @@ -6897,10 +6897,13 @@ FROM pg_stat_get_backend_idset() AS backendid; - databases_current oid + relations_total integer - OID of the database currently being processed. + The total number of relations which will be processed, or + NULL if the data checksums worker process hasn't + calculated the number of relations yet. The launcher process has + this NULL. @@ -6908,10 +6911,11 @@ FROM pg_stat_get_backend_idset() AS backendid; - relation_current oid + relations_done integer - OID of the relation currently being processed. + The number of relations which have been processed. The launcher + process has this NULL. @@ -6919,10 +6923,13 @@ FROM pg_stat_get_backend_idset() AS backendid; - relation_current_blocks integer + blocks_total integer - The total number of blocks in the relation currently being processed. + The number of blocks in the current relation which will be processed, + or NULL if the data checksums worker process hasn't + calculated the number of blocks yet. The launcher process has + this NULL. @@ -6930,11 +6937,11 @@ FROM pg_stat_get_backend_idset() AS backendid; - relation_current_blocks_processed integer + blocks_done integer - The number of blocks which have been processed in the relation currently - being processed. + The number of blocks in the current relation which have been processed. + The launcher process has this NULL. @@ -6982,9 +6989,10 @@ FROM pg_stat_get_backend_idset() AS backendid; - done + waiting on checkpoint - The command has finished processing and is exiting. + The command is currently waiting for a checkpoint to update the checksum + state at the end. diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml index 2562b1a002c..0ada90ca0b1 100644 --- a/doc/src/sgml/wal.sgml +++ b/doc/src/sgml/wal.sgml @@ -310,15 +310,17 @@ If the cluster is stopped while in inprogress-on mode, for any reason, then this process must be restarted manually. To do this, re-execute the function pg_enable_data_checksums() - once the cluster has been restarted. The background worker will attempt - to resume the work from where it was interrupted. + once the cluster has been restarted. The process will start over, there is + no support for resuming work from where it was interrupted. Enabling checksums can cause significant I/O to the system, as most of the database pages will need to be rewritten, and will be written both to the - data files and the WAL. + data files and the WAL. The impact may be limited by throttling using the + cost_delay and cost_limit + parameters of the pg_enable_data_checksums function. -- 2.48.1