From 4533de358dd5f2a8930e3a73bcb49103b37357be Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Tue, 12 Apr 2022 21:19:47 +1200 Subject: [PATCH] Fix documentation for pg_stat_recovery_prefetch. The table was in the wrong section and using an older type of link, as reported by Sirisha, and also using an older table layout, as I noticed while trying to figure out how and when it might have got out of sync. Defect in commit 5dc0418f. Author: sirisha chamarthi Author: Thomas Munro Discussion: https://postgr.es/m/CAKrAKeVk-LRHMdyT6x_p33eF6dCorM2jed5h_eHdRdv0reSYTA@mail.gmail.com --- doc/src/sgml/monitoring.sgml | 203 ++++++++++++++++++++++------------- 1 file changed, 131 insertions(+), 72 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 87b6e5fb5e8..180798a6b95 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -336,7 +336,8 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser pg_stat_recovery_prefetchpg_stat_recovery_prefetch Only one row, showing statistics about blocks prefetched during recovery. - See for details. + See + pg_stat_recovery_prefetch for details. @@ -2977,81 +2978,13 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i - - <structname>pg_stat_subscription</structname> + + <structname>pg_stat_recovery_prefetch</structname> - pg_stat_subscription + pg_stat_recovery_prefetch - - The pg_stat_subscription view will contain one - row per subscription for main worker (with null PID if the worker is - not running), and additional rows for workers handling the initial data - copy of the subscribed tables. - - - - <structname>pg_stat_recovery_prefetch</structname> View - - - - Column - Type - Description - - - - - - prefetch - bigint - Number of blocks prefetched because they were not in the buffer pool - - - hit - bigint - Number of blocks not prefetched because they were already in the buffer pool - - - skip_init - bigint - Number of blocks not prefetched because they would be zero-initialized - - - skip_new - bigint - Number of blocks not prefetched because they didn't exist yet - - - skip_fpw - bigint - Number of blocks not prefetched because a full page image was included in the WAL - - - skip_rep - bigint - Number of blocks not prefetched because they were already recently prefetched - - - wal_distance - integer - How many bytes ahead the prefetcher is looking - - - block_distance - integer - How many blocks ahead the prefetcher is looking - - - io_depth - integer - How many prefetches have been initiated but are not yet known to have completed - - - -
- The pg_stat_recovery_prefetch view will contain only one row. The columns wal_distance, @@ -3061,6 +2994,132 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i with the pg_stat_reset_shared function. + + <structname>pg_stat_recovery_prefetch</structname> View + + + + + Column Type + + + Description + + + + + + + + + prefetch bigint + + + Number of blocks prefetched because they were not in the buffer pool + + + + + + + + hit bigint + + + Number of blocks not prefetched because they were already in the buffer pool + + + + + + + + skip_init bigint + + + Number of blocks not prefetched because they would be zero-initialized + + + + + + + + skip_new bigint + + + Number of blocks not prefetched because they didn't exist yet + + + + + + + + skip_fpw bigint + + + Number of blocks not prefetched because a full page image was included in the WAL + + + + + + + + skip_rep bigint + + + Number of blocks not prefetched because they were already recently prefetched + + + + + + + + wal_distance int + + + How many bytes ahead the prefetcher is looking + + + + + + + + block_distance int + + + How many blocks ahead the prefetcher is looking + + + + + + + + io_depth int + + + How many prefetches have been initiated but are not yet known to have completed + + + + + +
+ +
+ + + <structname>pg_stat_subscription</structname> + + + pg_stat_subscription + + <structname>pg_stat_subscription</structname> View