From 7fc2753e49a1473c1afd3a2a6fcb60f8019d08a6 Mon Sep 17 00:00:00 2001
From: Peter Smith <peter.b.smith@fujitsu.com>
Date: Mon, 24 Oct 2022 12:32:26 +1100
Subject: [PATCH v3] Fix ordering - stats views

Rearrange the stats view sections to be alphabetically ordered.

BEFORE
28.2.3. pg_stat_activity
28.2.4. pg_stat_replication
28.2.5. pg_stat_replication_slots
28.2.6. pg_stat_wal_receiver
28.2.7. pg_stat_recovery_prefetch
28.2.8. pg_stat_subscription
28.2.9. pg_stat_subscription_stats
28.2.10. pg_stat_ssl
28.2.11. pg_stat_gssapi
28.2.12. pg_stat_archiver
28.2.13. pg_stat_bgwriter
28.2.14. pg_stat_wal
28.2.15. pg_stat_database
28.2.16. pg_stat_database_conflicts
28.2.17. pg_stat_all_tables
28.2.18. pg_stat_all_indexes
28.2.19. pg_statio_all_tables
28.2.20. pg_statio_all_indexes
28.2.21. pg_statio_all_sequences
28.2.22. pg_stat_user_functions
28.2.23. pg_stat_slru

AFTER
28.2.3. pg_stat_activity
28.2.4. pg_stat_all_indexes
28.2.5. pg_stat_all_tables
28.2.6. pg_stat_archiver
28.2.7. pg_stat_bgwriter
28.2.8. pg_stat_database
28.2.9. pg_stat_database_conflicts
28.2.10. pg_stat_gssapi
28.2.11. pg_stat_recovery_prefetch
28.2.12. pg_stat_replication
28.2.13. pg_stat_replication_slots
28.2.14. pg_stat_slru
28.2.15. pg_stat_ssl
28.2.16. pg_stat_subscription
28.2.17. pg_stat_subscription_stats
28.2.18. pg_stat_user_functions
28.2.19. pg_stat_wal
28.2.20. pg_stat_wal_receiver
28.2.21. pg_statio_all_tables
28.2.22. pg_statio_all_indexes
28.2.23. pg_statio_all_sequences
---
 doc/src/sgml/monitoring.sgml | 2442 +++++++++++++++++++++---------------------
 1 file changed, 1221 insertions(+), 1221 deletions(-)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index e5d622d..4733a28 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -2317,22 +2317,25 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-replication-view">
-  <title><structname>pg_stat_replication</structname></title>
+ <sect2 id="monitoring-pg-stat-all-indexes-view">
+  <title><structname>pg_stat_all_indexes</structname></title>
 
   <indexterm>
-   <primary>pg_stat_replication</primary>
+   <primary>pg_stat_all_indexes</primary>
   </indexterm>
 
-   <para>
-   The <structname>pg_stat_replication</structname> view will contain one row
-   per WAL sender process, showing statistics about replication to that
-   sender's connected standby server.  Only directly connected standbys are
-   listed; no information is available about downstream standby servers.
+  <para>
+   The <structname>pg_stat_all_indexes</structname> view will contain
+   one row for each index in the current database,
+   showing statistics about accesses to that specific index. The
+   <structname>pg_stat_user_indexes</structname> and
+   <structname>pg_stat_sys_indexes</structname> views
+   contain the same information,
+   but filtered to only show user and system indexes respectively.
   </para>
 
-  <table id="pg-stat-replication-view" xreflabel="pg_stat_replication">
-   <title><structname>pg_stat_replication</structname> View</title>
+  <table id="pg-stat-all-indexes-view" xreflabel="pg_stat_all_indexes">
+   <title><structname>pg_stat_all_indexes</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -2348,454 +2351,385 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>pid</structfield> <type>integer</type>
+       <structfield>relid</structfield> <type>oid</type>
       </para>
       <para>
-       Process ID of a WAL sender process
+       OID of the table for this index
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>usesysid</structfield> <type>oid</type>
+       <structfield>indexrelid</structfield> <type>oid</type>
       </para>
       <para>
-       OID of the user logged into this WAL sender process
+       OID of this index
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>usename</structfield> <type>name</type>
+       <structfield>schemaname</structfield> <type>name</type>
       </para>
       <para>
-       Name of the user logged into this WAL sender process
+       Name of the schema this index is in
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>application_name</structfield> <type>text</type>
+       <structfield>relname</structfield> <type>name</type>
       </para>
       <para>
-       Name of the application that is connected
-       to this WAL sender
+       Name of the table for this index
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>client_addr</structfield> <type>inet</type>
+       <structfield>indexrelname</structfield> <type>name</type>
       </para>
       <para>
-       IP address of the client connected to this WAL sender.
-       If this field is null, it indicates that the client is
-       connected via a Unix socket on the server machine.
+       Name of this index
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>client_hostname</structfield> <type>text</type>
+       <structfield>idx_scan</structfield> <type>bigint</type>
       </para>
       <para>
-       Host name of the connected client, as reported by a
-       reverse DNS lookup of <structfield>client_addr</structfield>. This field will
-       only be non-null for IP connections, and only when <xref linkend="guc-log-hostname"/> is enabled.
+       Number of index scans initiated on this index
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>client_port</structfield> <type>integer</type>
+       <structfield>last_idx_scan</structfield> <type>timestamptz</type>
       </para>
       <para>
-       TCP port number that the client is using for communication
-       with this WAL sender, or <literal>-1</literal> if a Unix socket is used
+       The time of the last scan on this index, based on the
+       most recent transaction stop time
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>backend_start</structfield> <type>timestamp with time zone</type>
+       <structfield>idx_tup_read</structfield> <type>bigint</type>
       </para>
       <para>
-       Time when this process was started, i.e., when the
-       client connected to this WAL sender
+       Number of index entries returned by scans on this index
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>backend_xmin</structfield> <type>xid</type>
+       <structfield>idx_tup_fetch</structfield> <type>bigint</type>
       </para>
       <para>
-       This standby's <literal>xmin</literal> horizon reported
-       by <xref linkend="guc-hot-standby-feedback"/>.
+       Number of live table rows fetched by simple index scans using this
+       index
       </para></entry>
      </row>
+    </tbody>
+   </tgroup>
+  </table>
+
+  <para>
+   Indexes can be used by simple index scans, <quote>bitmap</quote> index scans,
+   and the optimizer.  In a bitmap scan
+   the output of several indexes can be combined via AND or OR rules,
+   so it is difficult to associate individual heap row fetches
+   with specific indexes when a bitmap scan is used.  Therefore, a bitmap
+   scan increments the
+   <structname>pg_stat_all_indexes</structname>.<structfield>idx_tup_read</structfield>
+   count(s) for the index(es) it uses, and it increments the
+   <structname>pg_stat_all_tables</structname>.<structfield>idx_tup_fetch</structfield>
+   count for the table, but it does not affect
+   <structname>pg_stat_all_indexes</structname>.<structfield>idx_tup_fetch</structfield>.
+   The optimizer also accesses indexes to check for supplied constants
+   whose values are outside the recorded range of the optimizer statistics
+   because the optimizer statistics might be stale.
+  </para>
+
+  <note>
+   <para>
+    The <structfield>idx_tup_read</structfield> and <structfield>idx_tup_fetch</structfield> counts
+    can be different even without any use of bitmap scans,
+    because <structfield>idx_tup_read</structfield> counts
+    index entries retrieved from the index while <structfield>idx_tup_fetch</structfield>
+    counts live rows fetched from the table.  The latter will be less if any
+    dead or not-yet-committed rows are fetched using the index, or if any
+    heap fetches are avoided by means of an index-only scan.
+   </para>
+  </note>
+
+ </sect2>
+
+ <sect2 id="monitoring-pg-stat-all-tables-view">
+  <title><structname>pg_stat_all_tables</structname></title>
+
+  <indexterm>
+   <primary>pg_stat_all_tables</primary>
+  </indexterm>
+
+  <para>
+   The <structname>pg_stat_all_tables</structname> view will contain
+   one row for each table in the current database (including TOAST
+   tables), showing statistics about accesses to that specific table. The
+   <structname>pg_stat_user_tables</structname> and
+   <structname>pg_stat_sys_tables</structname> views
+   contain the same information,
+   but filtered to only show user and system tables respectively.
+  </para>
 
+  <table id="pg-stat-all-tables-view" xreflabel="pg_stat_all_tables">
+   <title><structname>pg_stat_all_tables</structname> View</title>
+   <tgroup cols="1">
+    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>state</structfield> <type>text</type>
+       Column Type
       </para>
       <para>
-       Current WAL sender state.
-       Possible values are:
-       <itemizedlist>
-        <listitem>
-         <para>
-          <literal>startup</literal>: This WAL sender is starting up.
-         </para>
-        </listitem>
-        <listitem>
-         <para>
-          <literal>catchup</literal>: This WAL sender's connected standby is
-          catching up with the primary.
-         </para>
-        </listitem>
-        <listitem>
-         <para>
-          <literal>streaming</literal>: This WAL sender is streaming changes
-          after its connected standby server has caught up with the primary.
-         </para>
-        </listitem>
-        <listitem>
-         <para>
-          <literal>backup</literal>: This WAL sender is sending a backup.
-         </para>
-        </listitem>
-        <listitem>
-         <para>
-          <literal>stopping</literal>: This WAL sender is stopping.
-         </para>
-        </listitem>
-       </itemizedlist>
+       Description
       </para></entry>
      </row>
+    </thead>
 
+    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sent_lsn</structfield> <type>pg_lsn</type>
+       <structfield>relid</structfield> <type>oid</type>
       </para>
       <para>
-       Last write-ahead log location sent on this connection
+       OID of a table
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>write_lsn</structfield> <type>pg_lsn</type>
+       <structfield>schemaname</structfield> <type>name</type>
       </para>
       <para>
-       Last write-ahead log location written to disk by this standby
-       server
+       Name of the schema that this table is in
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>flush_lsn</structfield> <type>pg_lsn</type>
+       <structfield>relname</structfield> <type>name</type>
       </para>
       <para>
-       Last write-ahead log location flushed to disk by this standby
-       server
+       Name of this table
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>replay_lsn</structfield> <type>pg_lsn</type>
+       <structfield>seq_scan</structfield> <type>bigint</type>
       </para>
       <para>
-       Last write-ahead log location replayed into the database on this
-       standby server
+       Number of sequential scans initiated on this table
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>write_lag</structfield> <type>interval</type>
+       <structfield>last_seq_scan</structfield> <type>timestamptz</type>
       </para>
       <para>
-       Time elapsed between flushing recent WAL locally and receiving
-       notification that this standby server has written it (but not yet
-       flushed it or applied it).  This can be used to gauge the delay that
-       <literal>synchronous_commit</literal> level
-       <literal>remote_write</literal> incurred while committing if this
-       server was configured as a synchronous standby.
+       The time of the last sequential scan on this table, based on the
+       most recent transaction stop time
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>flush_lag</structfield> <type>interval</type>
+       <structfield>seq_tup_read</structfield> <type>bigint</type>
       </para>
       <para>
-       Time elapsed between flushing recent WAL locally and receiving
-       notification that this standby server has written and flushed it
-       (but not yet applied it).  This can be used to gauge the delay that
-       <literal>synchronous_commit</literal> level
-       <literal>on</literal> incurred while committing if this
-       server was configured as a synchronous standby.
+       Number of live rows fetched by sequential scans
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>replay_lag</structfield> <type>interval</type>
+       <structfield>idx_scan</structfield> <type>bigint</type>
       </para>
       <para>
-       Time elapsed between flushing recent WAL locally and receiving
-       notification that this standby server has written, flushed and
-       applied it.  This can be used to gauge the delay that
-       <literal>synchronous_commit</literal> level
-       <literal>remote_apply</literal> incurred while committing if this
-       server was configured as a synchronous standby.
+       Number of index scans initiated on this table
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sync_priority</structfield> <type>integer</type>
+       <structfield>last_idx_scan</structfield> <type>timestamptz</type>
       </para>
       <para>
-       Priority of this standby server for being chosen as the
-       synchronous standby in a priority-based synchronous replication.
-       This has no effect in a quorum-based synchronous replication.
+       The time of the last index scan on this table, based on the
+       most recent transaction stop time
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sync_state</structfield> <type>text</type>
+       <structfield>idx_tup_fetch</structfield> <type>bigint</type>
       </para>
       <para>
-       Synchronous state of this standby server.
-       Possible values are:
-       <itemizedlist>
-        <listitem>
-         <para>
-          <literal>async</literal>: This standby server is asynchronous.
-         </para>
-        </listitem>
-        <listitem>
-         <para>
-          <literal>potential</literal>: This standby server is now asynchronous,
-          but can potentially become synchronous if one of current
-          synchronous ones fails.
-         </para>
-        </listitem>
-        <listitem>
-         <para>
-          <literal>sync</literal>: This standby server is synchronous.
-         </para>
-        </listitem>
-        <listitem>
-         <para>
-          <literal>quorum</literal>: This standby server is considered as a candidate
-          for quorum standbys.
-         </para>
-        </listitem>
-       </itemizedlist>
+       Number of live rows fetched by index scans
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>reply_time</structfield> <type>timestamp with time zone</type>
+       <structfield>n_tup_ins</structfield> <type>bigint</type>
       </para>
       <para>
-       Send time of last reply message received from standby server
+       Number of rows inserted
       </para></entry>
      </row>
-    </tbody>
-   </tgroup>
-  </table>
 
-  <para>
-   The lag times reported in the <structname>pg_stat_replication</structname>
-   view are measurements of the time taken for recent WAL to be written,
-   flushed and replayed and for the sender to know about it.  These times
-   represent the commit delay that was (or would have been) introduced by each
-   synchronous commit level, if the remote server was configured as a
-   synchronous standby.  For an asynchronous standby, the
-   <structfield>replay_lag</structfield> column approximates the delay
-   before recent transactions became visible to queries.  If the standby
-   server has entirely caught up with the sending server and there is no more
-   WAL activity, the most recently measured lag times will continue to be
-   displayed for a short time and then show NULL.
-  </para>
-
-  <para>
-   Lag times work automatically for physical replication. Logical decoding
-   plugins may optionally emit tracking messages; if they do not, the tracking
-   mechanism will simply display NULL lag.
-  </para>
-
-  <note>
-   <para>
-    The reported lag times are not predictions of how long it will take for
-    the standby to catch up with the sending server assuming the current
-    rate of replay.  Such a system would show similar times while new WAL is
-    being generated, but would differ when the sender becomes idle.  In
-    particular, when the standby has caught up completely,
-    <structname>pg_stat_replication</structname> shows the time taken to
-    write, flush and replay the most recent reported WAL location rather than
-    zero as some users might expect.  This is consistent with the goal of
-    measuring synchronous commit and transaction visibility delays for
-    recent write transactions.
-    To reduce confusion for users expecting a different model of lag, the
-    lag columns revert to NULL after a short time on a fully replayed idle
-    system. Monitoring systems should choose whether to represent this
-    as missing data, zero or continue to display the last known value.
-   </para>
-  </note>
-
- </sect2>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>n_tup_upd</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of rows updated (includes <link linkend="storage-hot">HOT updated rows</link>)
+      </para></entry>
+     </row>
 
- <sect2 id="monitoring-pg-stat-replication-slots-view">
-  <title><structname>pg_stat_replication_slots</structname></title>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>n_tup_del</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of rows deleted
+      </para></entry>
+     </row>
 
-  <indexterm>
-   <primary>pg_stat_replication_slots</primary>
-  </indexterm>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>n_tup_hot_upd</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of rows HOT updated (i.e., with no separate index
+       update required)
+      </para></entry>
+     </row>
 
-  <para>
-   The <structname>pg_stat_replication_slots</structname> view will contain
-   one row per logical replication slot, showing statistics about its usage.
-  </para>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>n_live_tup</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Estimated number of live rows
+      </para></entry>
+     </row>
 
-  <table id="pg-stat-replication-slots-view" xreflabel="pg_stat_replication_slots">
-   <title><structname>pg_stat_replication_slots</structname> View</title>
-   <tgroup cols="1">
-    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        Column Type
-       </para>
-       <para>
-        Description
+       <structfield>n_dead_tup</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Estimated number of dead rows
       </para></entry>
      </row>
-    </thead>
 
-    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>slot_name</structfield> <type>text</type>
-       </para>
-       <para>
-        A unique, cluster-wide identifier for the replication slot
+       <structfield>n_mod_since_analyze</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Estimated number of rows modified since this table was last analyzed
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>spill_txns</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of transactions spilled to disk once the memory used by
-        logical decoding to decode changes from WAL has exceeded
-        <literal>logical_decoding_work_mem</literal>. The counter gets
-        incremented for both top-level transactions and subtransactions.
+       <structfield>n_ins_since_vacuum</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Estimated number of rows inserted since this table was last vacuumed
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>spill_count</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of times transactions were spilled to disk while decoding
-        changes from WAL for this slot. This counter is incremented each time
-        a transaction is spilled, and the same transaction may be spilled
-        multiple times.
+       <structfield>last_vacuum</structfield> <type>timestamp with time zone</type>
+      </para>
+      <para>
+       Last time at which this table was manually vacuumed
+       (not counting <command>VACUUM FULL</command>)
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>spill_bytes</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Amount of decoded transaction data spilled to disk while performing
-        decoding of changes from WAL for this slot. This and other spill
-        counters can be used to gauge the I/O which occurred during logical
-        decoding and allow tuning <literal>logical_decoding_work_mem</literal>.
+       <structfield>last_autovacuum</structfield> <type>timestamp with time zone</type>
+      </para>
+      <para>
+       Last time at which this table was vacuumed by the autovacuum
+       daemon
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>stream_txns</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of in-progress transactions streamed to the decoding output
-        plugin after the memory used by logical decoding to decode changes
-        from WAL for this slot has exceeded
-        <literal>logical_decoding_work_mem</literal>. Streaming only
-        works with top-level transactions (subtransactions can't be streamed
-        independently), so the counter is not incremented for subtransactions.
-       </para></entry>
+       <structfield>last_analyze</structfield> <type>timestamp with time zone</type>
+      </para>
+      <para>
+       Last time at which this table was manually analyzed
+      </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>stream_count</structfield><type>bigint</type>
-       </para>
-       <para>
-        Number of times in-progress transactions were streamed to the decoding
-        output plugin while decoding changes from WAL for this slot. This
-        counter is incremented each time a transaction is streamed, and the
-        same transaction may be streamed multiple times.
+       <structfield>last_autoanalyze</structfield> <type>timestamp with time zone</type>
+      </para>
+      <para>
+       Last time at which this table was analyzed by the autovacuum
+       daemon
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>stream_bytes</structfield><type>bigint</type>
-       </para>
-       <para>
-        Amount of transaction data decoded for streaming in-progress
-        transactions to the decoding output plugin while decoding changes from
-        WAL for this slot. This and other streaming counters for this slot can
-        be used to tune <literal>logical_decoding_work_mem</literal>.
-       </para>
-      </entry>
+       <structfield>vacuum_count</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of times this table has been manually vacuumed
+       (not counting <command>VACUUM FULL</command>)
+      </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>total_txns</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of decoded transactions sent to the decoding output plugin for
-        this slot. This counts top-level transactions only, and is not incremented
-        for subtransactions. Note that this includes the transactions that are
-        streamed and/or spilled.
-       </para></entry>
+       <structfield>autovacuum_count</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of times this table has been vacuumed by the autovacuum
+       daemon
+      </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>total_bytes</structfield><type>bigint</type>
-       </para>
-       <para>
-        Amount of transaction data decoded for sending transactions to the
-        decoding output plugin while decoding changes from WAL for this slot.
-        Note that this includes data that is streamed and/or spilled.
-       </para>
-      </entry>
+       <structfield>analyze_count</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of times this table has been manually analyzed
+      </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-        <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
-       </para>
-       <para>
-        Time at which these statistics were last reset
-       </para></entry>
+       <structfield>autoanalyze_count</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of times this table has been analyzed by the autovacuum
+       daemon
+      </para></entry>
      </row>
     </tbody>
    </tgroup>
@@ -2803,21 +2737,20 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-wal-receiver-view">
-  <title><structname>pg_stat_wal_receiver</structname></title>
+ <sect2 id="monitoring-pg-stat-archiver-view">
+  <title><structname>pg_stat_archiver</structname></title>
 
   <indexterm>
-   <primary>pg_stat_wal_receiver</primary>
+   <primary>pg_stat_archiver</primary>
   </indexterm>
 
   <para>
-   The <structname>pg_stat_wal_receiver</structname> view will contain only
-   one row, showing statistics about the WAL receiver from that receiver's
-   connected server.
+   The <structname>pg_stat_archiver</structname> view will always have a
+   single row, containing data about the archiver process of the cluster.
   </para>
 
-  <table id="pg-stat-wal-receiver-view" xreflabel="pg_stat_wal_receiver">
-   <title><structname>pg_stat_wal_receiver</structname> View</title>
+  <table id="pg-stat-archiver-view" xreflabel="pg_stat_archiver">
+   <title><structname>pg_stat_archiver</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -2833,148 +2766,210 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>pid</structfield> <type>integer</type>
+       <structfield>archived_count</structfield> <type>bigint</type>
       </para>
       <para>
-       Process ID of the WAL receiver process
+       Number of WAL files that have been successfully archived
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>status</structfield> <type>text</type>
+       <structfield>last_archived_wal</structfield> <type>text</type>
       </para>
       <para>
-       Activity status of the WAL receiver process
+       Name of the WAL file most recently successfully archived
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>receive_start_lsn</structfield> <type>pg_lsn</type>
+       <structfield>last_archived_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       First write-ahead log location used when WAL receiver is
-       started
+       Time of the most recent successful archive operation
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>receive_start_tli</structfield> <type>integer</type>
+       <structfield>failed_count</structfield> <type>bigint</type>
       </para>
       <para>
-       First timeline number used when WAL receiver is started
+       Number of failed attempts for archiving WAL files
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>written_lsn</structfield> <type>pg_lsn</type>
+       <structfield>last_failed_wal</structfield> <type>text</type>
       </para>
       <para>
-       Last write-ahead log location already received and written to disk,
-       but not flushed. This should not be used for data integrity checks.
+       Name of the WAL file of the most recent failed archival operation
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>flushed_lsn</structfield> <type>pg_lsn</type>
+       <structfield>last_failed_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Last write-ahead log location already received and flushed to
-       disk, the initial value of this field being the first log location used
-       when WAL receiver is started
+       Time of the most recent failed archival operation
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>received_tli</structfield> <type>integer</type>
+       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Timeline number of last write-ahead log location received and
-       flushed to disk, the initial value of this field being the timeline
-       number of the first log location used when WAL receiver is started
+       Time at which these statistics were last reset
       </para></entry>
      </row>
+    </tbody>
+   </tgroup>
+  </table>
+
+  <para>
+    Normally, WAL files are archived in order, oldest to newest, but that is
+    not guaranteed, and does not hold under special circumstances like when
+    promoting a standby or after crash recovery. Therefore it is not safe to
+    assume that all files older than
+    <structfield>last_archived_wal</structfield> have also been successfully
+    archived.
+  </para>
+
+ </sect2>
+
+ <sect2 id="monitoring-pg-stat-bgwriter-view">
+  <title><structname>pg_stat_bgwriter</structname></title>
+
+  <indexterm>
+   <primary>pg_stat_bgwriter</primary>
+  </indexterm>
 
+  <para>
+   The <structname>pg_stat_bgwriter</structname> view will always have a
+   single row, containing global data for the cluster.
+  </para>
+
+  <table id="pg-stat-bgwriter-view" xreflabel="pg_stat_bgwriter">
+   <title><structname>pg_stat_bgwriter</structname> View</title>
+   <tgroup cols="1">
+    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_msg_send_time</structfield> <type>timestamp with time zone</type>
+       Column Type
       </para>
       <para>
-       Send time of last message received from origin WAL sender
+       Description
       </para></entry>
      </row>
+    </thead>
 
+    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_msg_receipt_time</structfield> <type>timestamp with time zone</type>
+       <structfield>checkpoints_timed</structfield> <type>bigint</type>
       </para>
       <para>
-       Receipt time of last message received from origin WAL sender
+       Number of scheduled checkpoints that have been performed
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>latest_end_lsn</structfield> <type>pg_lsn</type>
+       <structfield>checkpoints_req</structfield> <type>bigint</type>
       </para>
       <para>
-       Last write-ahead log location reported to origin WAL sender
+       Number of requested checkpoints that have been performed
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>latest_end_time</structfield> <type>timestamp with time zone</type>
+       <structfield>checkpoint_write_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Time of last write-ahead log location reported to origin WAL sender
+       Total amount of time that has been spent in the portion of
+       checkpoint processing where files are written to disk, in milliseconds
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>slot_name</structfield> <type>text</type>
+       <structfield>checkpoint_sync_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Replication slot name used by this WAL receiver
+       Total amount of time that has been spent in the portion of
+       checkpoint processing where files are synchronized to disk, in
+       milliseconds
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sender_host</structfield> <type>text</type>
+       <structfield>buffers_checkpoint</structfield> <type>bigint</type>
       </para>
       <para>
-       Host of the <productname>PostgreSQL</productname> instance
-       this WAL receiver is connected to. This can be a host name,
-       an IP address, or a directory path if the connection is via
-       Unix socket.  (The path case can be distinguished because it
-       will always be an absolute path, beginning with <literal>/</literal>.)
+       Number of buffers written during checkpoints
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sender_port</structfield> <type>integer</type>
+       <structfield>buffers_clean</structfield> <type>bigint</type>
       </para>
       <para>
-       Port number of the <productname>PostgreSQL</productname> instance
-       this WAL receiver is connected to.
+       Number of buffers written by the background writer
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>conninfo</structfield> <type>text</type>
+       <structfield>maxwritten_clean</structfield> <type>bigint</type>
       </para>
       <para>
-       Connection string used by this WAL receiver,
-       with security-sensitive fields obfuscated.
+       Number of times the background writer stopped a cleaning
+       scan because it had written too many buffers
+      </para></entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>buffers_backend</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of buffers written directly by a backend
+      </para></entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>buffers_backend_fsync</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of times a backend had to execute its own
+       <function>fsync</function> call (normally the background writer handles those
+       even when the backend does its own write)
+      </para></entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>buffers_alloc</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of buffers allocated
+      </para></entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
+      </para>
+      <para>
+       Time at which these statistics were last reset
       </para></entry>
      </row>
     </tbody>
@@ -2983,24 +2978,21 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-recovery-prefetch">
-  <title><structname>pg_stat_recovery_prefetch</structname></title>
+ <sect2 id="monitoring-pg-stat-database-view">
+  <title><structname>pg_stat_database</structname></title>
 
   <indexterm>
-   <primary>pg_stat_recovery_prefetch</primary>
+   <primary>pg_stat_database</primary>
   </indexterm>
 
   <para>
-   The <structname>pg_stat_recovery_prefetch</structname> view will contain
-   only one row.  The columns <structfield>wal_distance</structfield>,
-   <structfield>block_distance</structfield> and
-   <structfield>io_depth</structfield> show current values, and the
-   other columns show cumulative counters that can be reset
-   with the <function>pg_stat_reset_shared</function> function.
+   The <structname>pg_stat_database</structname> view will contain one row
+   for each database in the cluster, plus one for shared objects, showing
+   database-wide statistics.
   </para>
 
-  <table id="pg-stat-recovery-prefetch-view" xreflabel="pg_stat_recovery_prefetch">
-   <title><structname>pg_stat_recovery_prefetch</structname> View</title>
+  <table id="pg-stat-database-view" xreflabel="pg_stat_database">
+   <title><structname>pg_stat_database</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -3015,292 +3007,285 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
     <tbody>
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
-       </para>
-       <para>
-        Time at which these statistics were last reset
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>datid</structfield> <type>oid</type>
+      </para>
+      <para>
+       OID of this database, or 0 for objects belonging to a shared
+       relation
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>prefetch</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of blocks prefetched because they were not in the buffer pool
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>datname</structfield> <type>name</type>
+      </para>
+      <para>
+       Name of this database, or <literal>NULL</literal> for shared
+       objects.
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>hit</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of blocks not prefetched because they were already in the buffer pool
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>numbackends</structfield> <type>integer</type>
+      </para>
+      <para>
+       Number of backends currently connected to this database, or
+       <literal>NULL</literal> for shared objects.  This is the only column
+       in this view that returns a value reflecting current state; all other
+       columns return the accumulated values since the last reset.
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>skip_init</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of blocks not prefetched because they would be zero-initialized
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>xact_commit</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of transactions in this database that have been
+       committed
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>skip_new</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of blocks not prefetched because they didn't exist yet
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>xact_rollback</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of transactions in this database that have been
+       rolled back
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>skip_fpw</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of blocks not prefetched because a full page image was included in the WAL
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>blks_read</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of disk blocks read in this database
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>skip_rep</structfield> <type>bigint</type>
-       </para>
-       <para>
-        Number of blocks not prefetched because they were already recently prefetched
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>blks_hit</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of times disk blocks were found already in the buffer
+       cache, so that a read was not necessary (this only includes hits in the
+       PostgreSQL buffer cache, not the operating system's file system cache)
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>wal_distance</structfield> <type>int</type>
-       </para>
-       <para>
-        How many bytes ahead the prefetcher is looking
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>tup_returned</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of live rows fetched by sequential scans and index entries returned by index scans in this database
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>block_distance</structfield> <type>int</type>
-       </para>
-       <para>
-        How many blocks ahead the prefetcher is looking
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>tup_fetched</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of live rows fetched by index scans in this database
+      </para></entry>
      </row>
 
      <row>
-      <entry role="catalog_table_entry">
-       <para role="column_definition">
-        <structfield>io_depth</structfield> <type>int</type>
-       </para>
-       <para>
-        How many prefetches have been initiated but are not yet known to have completed
-       </para>
-      </entry>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>tup_inserted</structfield> <type>bigint</type>
+      </para>
+      <para>
+       Number of rows inserted by queries in this database
+      </para></entry>
      </row>
-    </tbody>
-   </tgroup>
-  </table>
 
- </sect2>
-
- <sect2 id="monitoring-pg-stat-subscription">
-  <title><structname>pg_stat_subscription</structname></title>
-
-  <indexterm>
-   <primary>pg_stat_subscription</primary>
-  </indexterm>
-
-  <table id="pg-stat-subscription" xreflabel="pg_stat_subscription">
-   <title><structname>pg_stat_subscription</structname> View</title>
-   <tgroup cols="1">
-    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       Column Type
+       <structfield>tup_updated</structfield> <type>bigint</type>
       </para>
       <para>
-       Description
+       Number of rows updated by queries in this database
       </para></entry>
      </row>
-    </thead>
 
-    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>subid</structfield> <type>oid</type>
+       <structfield>tup_deleted</structfield> <type>bigint</type>
       </para>
       <para>
-       OID of the subscription
+       Number of rows deleted by queries in this database
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>subname</structfield> <type>name</type>
+       <structfield>conflicts</structfield> <type>bigint</type>
       </para>
       <para>
-       Name of the subscription
+       Number of queries canceled due to conflicts with recovery
+       in this database. (Conflicts occur only on standby servers; see
+       <link linkend="monitoring-pg-stat-database-conflicts-view">
+       <structname>pg_stat_database_conflicts</structname></link> for details.)
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>pid</structfield> <type>integer</type>
+       <structfield>temp_files</structfield> <type>bigint</type>
       </para>
       <para>
-       Process ID of the subscription worker process
+       Number of temporary files created by queries in this database.
+       All temporary files are counted, regardless of why the temporary file
+       was created (e.g., sorting or hashing), and regardless of the
+       <xref linkend="guc-log-temp-files"/> setting.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>relid</structfield> <type>oid</type>
+       <structfield>temp_bytes</structfield> <type>bigint</type>
       </para>
       <para>
-       OID of the relation that the worker is synchronizing; null for the
-       main apply worker
+       Total amount of data written to temporary files by queries in
+       this database. All temporary files are counted, regardless of why
+       the temporary file was created, and
+       regardless of the <xref linkend="guc-log-temp-files"/> setting.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>received_lsn</structfield> <type>pg_lsn</type>
+       <structfield>deadlocks</structfield> <type>bigint</type>
       </para>
       <para>
-       Last write-ahead log location received, the initial value of
-       this field being 0
+       Number of deadlocks detected in this database
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_msg_send_time</structfield> <type>timestamp with time zone</type>
+       <structfield>checksum_failures</structfield> <type>bigint</type>
       </para>
       <para>
-       Send time of last message received from origin WAL sender
+       Number of data page checksum failures detected in this
+       database (or on a shared object), or NULL if data checksums are not
+       enabled.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_msg_receipt_time</structfield> <type>timestamp with time zone</type>
+       <structfield>checksum_last_failure</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Receipt time of last message received from origin WAL sender
+       Time at which the last data page checksum failure was detected in
+       this database (or on a shared object), or NULL if data checksums are not
+       enabled.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>latest_end_lsn</structfield> <type>pg_lsn</type>
+       <structfield>blk_read_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Last write-ahead log location reported to origin WAL sender
+       Time spent reading data file blocks by backends in this database,
+       in milliseconds (if <xref linkend="guc-track-io-timing"/> is enabled,
+       otherwise zero)
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>latest_end_time</structfield> <type>timestamp with time zone</type>
+       <structfield>blk_write_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Time of last write-ahead log location reported to origin WAL
-       sender
+       Time spent writing data file blocks by backends in this database,
+       in milliseconds (if <xref linkend="guc-track-io-timing"/> is enabled,
+       otherwise zero)
       </para></entry>
      </row>
-    </tbody>
-   </tgroup>
-  </table>
-
- </sect2>
 
- <sect2 id="monitoring-pg-stat-subscription-stats">
-  <title><structname>pg_stat_subscription_stats</structname></title>
-
-  <indexterm>
-   <primary>pg_stat_subscription_stats</primary>
-  </indexterm>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>session_time</structfield> <type>double precision</type>
+      </para>
+      <para>
+       Time spent by database sessions in this database, in milliseconds
+       (note that statistics are only updated when the state of a session
+       changes, so if sessions have been idle for a long time, this idle time
+       won't be included)
+      </para></entry>
+     </row>
 
-  <para>
-   The <structname>pg_stat_subscription_stats</structname> view will contain
-   one row per subscription.
-  </para>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>active_time</structfield> <type>double precision</type>
+      </para>
+      <para>
+       Time spent executing SQL statements in this database, in milliseconds
+       (this corresponds to the states <literal>active</literal> and
+       <literal>fastpath function call</literal> in
+       <link linkend="monitoring-pg-stat-activity-view">
+       <structname>pg_stat_activity</structname></link>)
+      </para></entry>
+     </row>
 
-  <table id="pg-stat-subscription-stats" xreflabel="pg_stat_subscription_stats">
-   <title><structname>pg_stat_subscription_stats</structname> View</title>
-   <tgroup cols="1">
-    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       Column Type
+       <structfield>idle_in_transaction_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Description
+       Time spent idling while in a transaction in this database, in milliseconds
+       (this corresponds to the states <literal>idle in transaction</literal> and
+       <literal>idle in transaction (aborted)</literal> in
+       <link linkend="monitoring-pg-stat-activity-view">
+       <structname>pg_stat_activity</structname></link>)
       </para></entry>
      </row>
-    </thead>
 
-    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>subid</structfield> <type>oid</type>
+       <structfield>sessions</structfield> <type>bigint</type>
       </para>
       <para>
-       OID of the subscription
+       Total number of sessions established to this database
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>subname</structfield> <type>name</type>
+       <structfield>sessions_abandoned</structfield> <type>bigint</type>
       </para>
       <para>
-       Name of the subscription
+       Number of database sessions to this database that were terminated
+       because connection to the client was lost
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>apply_error_count</structfield> <type>bigint</type>
+       <structfield>sessions_fatal</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of times an error occurred while applying changes
+       Number of database sessions to this database that were terminated
+       by fatal errors
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sync_error_count</structfield> <type>bigint</type>
+       <structfield>sessions_killed</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of times an error occurred during the initial table
-       synchronization
+       Number of database sessions to this database that were terminated
+       by operator intervention
       </para></entry>
      </row>
 
@@ -3318,24 +3303,23 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-ssl-view">
-  <title><structname>pg_stat_ssl</structname></title>
+ <sect2 id="monitoring-pg-stat-database-conflicts-view">
+  <title><structname>pg_stat_database_conflicts</structname></title>
 
   <indexterm>
-   <primary>pg_stat_ssl</primary>
+   <primary>pg_stat_database_conflicts</primary>
   </indexterm>
 
   <para>
-   The <structname>pg_stat_ssl</structname> view will contain one row per
-   backend or WAL sender process, showing statistics about SSL usage on
-   this connection. It can be joined to <structname>pg_stat_activity</structname>
-   or <structname>pg_stat_replication</structname> on the
-   <structfield>pid</structfield> column to get more details about the
-   connection.
+   The <structname>pg_stat_database_conflicts</structname> view will contain
+   one row per database, showing database-wide statistics about
+   query cancels occurring due to conflicts with recovery on standby servers.
+   This view will only contain information on standby servers, since
+   conflicts do not occur on primary servers.
   </para>
 
-  <table id="pg-stat-ssl-view" xreflabel="pg_stat_ssl">
-   <title><structname>pg_stat_ssl</structname> View</title>
+  <table id="pg-stat-database-conflicts-view" xreflabel="pg_stat_database_conflicts">
+   <title><structname>pg_stat_database_conflicts</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -3351,86 +3335,69 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>pid</structfield> <type>integer</type>
-      </para>
-      <para>
-       Process ID of a backend or WAL sender process
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>ssl</structfield> <type>boolean</type>
+       <structfield>datid</structfield> <type>oid</type>
       </para>
       <para>
-       True if SSL is used on this connection
+       OID of a database
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>version</structfield> <type>text</type>
+       <structfield>datname</structfield> <type>name</type>
       </para>
       <para>
-       Version of SSL in use, or NULL if SSL is not in use
-       on this connection
+       Name of this database
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>cipher</structfield> <type>text</type>
+       <structfield>confl_tablespace</structfield> <type>bigint</type>
       </para>
       <para>
-       Name of SSL cipher in use, or NULL if SSL is not in use
-       on this connection
+       Number of queries in this database that have been canceled due to
+       dropped tablespaces
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>bits</structfield> <type>integer</type>
+       <structfield>confl_lock</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of bits in the encryption algorithm used, or NULL
-       if SSL is not used on this connection
+       Number of queries in this database that have been canceled due to
+       lock timeouts
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>client_dn</structfield> <type>text</type>
+       <structfield>confl_snapshot</structfield> <type>bigint</type>
       </para>
       <para>
-       Distinguished Name (DN) field from the client certificate
-       used, or NULL if no client certificate was supplied or if SSL
-       is not in use on this connection. This field is truncated if the
-       DN field is longer than <symbol>NAMEDATALEN</symbol> (64 characters
-       in a standard build).
+       Number of queries in this database that have been canceled due to
+       old snapshots
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>client_serial</structfield> <type>numeric</type>
+       <structfield>confl_bufferpin</structfield> <type>bigint</type>
       </para>
       <para>
-       Serial number of the client certificate, or NULL if no client
-       certificate was supplied or if SSL is not in use on this connection.  The
-       combination of certificate serial number and certificate issuer uniquely
-       identifies a certificate (unless the issuer erroneously reuses serial
-       numbers).
+       Number of queries in this database that have been canceled due to
+       pinned buffers
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>issuer_dn</structfield> <type>text</type>
+       <structfield>confl_deadlock</structfield> <type>bigint</type>
       </para>
       <para>
-       DN of the issuer of the client certificate, or NULL if no client
-       certificate was supplied or if SSL is not in use on this connection.
-       This field is truncated like <structfield>client_dn</structfield>.
+       Number of queries in this database that have been canceled due to
+       deadlocks
       </para></entry>
      </row>
     </tbody>
@@ -3514,20 +3481,168 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-archiver-view">
-  <title><structname>pg_stat_archiver</structname></title>
+ <sect2 id="monitoring-pg-stat-recovery-prefetch">
+  <title><structname>pg_stat_recovery_prefetch</structname></title>
+
+  <indexterm>
+   <primary>pg_stat_recovery_prefetch</primary>
+  </indexterm>
+
+  <para>
+   The <structname>pg_stat_recovery_prefetch</structname> view will contain
+   only one row.  The columns <structfield>wal_distance</structfield>,
+   <structfield>block_distance</structfield> and
+   <structfield>io_depth</structfield> show current values, and the
+   other columns show cumulative counters that can be reset
+   with the <function>pg_stat_reset_shared</function> function.
+  </para>
+
+  <table id="pg-stat-recovery-prefetch-view" xreflabel="pg_stat_recovery_prefetch">
+   <title><structname>pg_stat_recovery_prefetch</structname> View</title>
+   <tgroup cols="1">
+    <thead>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       Column Type
+      </para>
+      <para>
+       Description
+      </para></entry>
+     </row>
+    </thead>
+
+    <tbody>
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
+       </para>
+       <para>
+        Time at which these statistics were last reset
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>prefetch</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of blocks prefetched because they were not in the buffer pool
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>hit</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of blocks not prefetched because they were already in the buffer pool
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>skip_init</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of blocks not prefetched because they would be zero-initialized
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>skip_new</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of blocks not prefetched because they didn't exist yet
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>skip_fpw</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of blocks not prefetched because a full page image was included in the WAL
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>skip_rep</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of blocks not prefetched because they were already recently prefetched
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>wal_distance</structfield> <type>int</type>
+       </para>
+       <para>
+        How many bytes ahead the prefetcher is looking
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>block_distance</structfield> <type>int</type>
+       </para>
+       <para>
+        How many blocks ahead the prefetcher is looking
+       </para>
+      </entry>
+     </row>
+
+     <row>
+      <entry role="catalog_table_entry">
+       <para role="column_definition">
+        <structfield>io_depth</structfield> <type>int</type>
+       </para>
+       <para>
+        How many prefetches have been initiated but are not yet known to have completed
+       </para>
+      </entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </table>
+
+ </sect2>
+
+ <sect2 id="monitoring-pg-stat-replication-view">
+  <title><structname>pg_stat_replication</structname></title>
 
   <indexterm>
-   <primary>pg_stat_archiver</primary>
+   <primary>pg_stat_replication</primary>
   </indexterm>
 
-  <para>
-   The <structname>pg_stat_archiver</structname> view will always have a
-   single row, containing data about the archiver process of the cluster.
+   <para>
+   The <structname>pg_stat_replication</structname> view will contain one row
+   per WAL sender process, showing statistics about replication to that
+   sender's connected standby server.  Only directly connected standbys are
+   listed; no information is available about downstream standby servers.
   </para>
 
-  <table id="pg-stat-archiver-view" xreflabel="pg_stat_archiver">
-   <title><structname>pg_stat_archiver</structname> View</title>
+  <table id="pg-stat-replication-view" xreflabel="pg_stat_replication">
+   <title><structname>pg_stat_replication</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -3543,240 +3658,334 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>archived_count</structfield> <type>bigint</type>
+       <structfield>pid</structfield> <type>integer</type>
       </para>
       <para>
-       Number of WAL files that have been successfully archived
+       Process ID of a WAL sender process
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_archived_wal</structfield> <type>text</type>
+       <structfield>usesysid</structfield> <type>oid</type>
       </para>
       <para>
-       Name of the WAL file most recently successfully archived
+       OID of the user logged into this WAL sender process
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_archived_time</structfield> <type>timestamp with time zone</type>
+       <structfield>usename</structfield> <type>name</type>
       </para>
       <para>
-       Time of the most recent successful archive operation
+       Name of the user logged into this WAL sender process
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>failed_count</structfield> <type>bigint</type>
+       <structfield>application_name</structfield> <type>text</type>
       </para>
       <para>
-       Number of failed attempts for archiving WAL files
+       Name of the application that is connected
+       to this WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_failed_wal</structfield> <type>text</type>
+       <structfield>client_addr</structfield> <type>inet</type>
       </para>
       <para>
-       Name of the WAL file of the most recent failed archival operation
+       IP address of the client connected to this WAL sender.
+       If this field is null, it indicates that the client is
+       connected via a Unix socket on the server machine.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_failed_time</structfield> <type>timestamp with time zone</type>
+       <structfield>client_hostname</structfield> <type>text</type>
       </para>
       <para>
-       Time of the most recent failed archival operation
+       Host name of the connected client, as reported by a
+       reverse DNS lookup of <structfield>client_addr</structfield>. This field will
+       only be non-null for IP connections, and only when <xref linkend="guc-log-hostname"/> is enabled.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
+       <structfield>client_port</structfield> <type>integer</type>
       </para>
       <para>
-       Time at which these statistics were last reset
+       TCP port number that the client is using for communication
+       with this WAL sender, or <literal>-1</literal> if a Unix socket is used
       </para></entry>
      </row>
-    </tbody>
-   </tgroup>
-  </table>
 
-  <para>
-    Normally, WAL files are archived in order, oldest to newest, but that is
-    not guaranteed, and does not hold under special circumstances like when
-    promoting a standby or after crash recovery. Therefore it is not safe to
-    assume that all files older than
-    <structfield>last_archived_wal</structfield> have also been successfully
-    archived.
-  </para>
-
- </sect2>
-
- <sect2 id="monitoring-pg-stat-bgwriter-view">
-  <title><structname>pg_stat_bgwriter</structname></title>
-
-  <indexterm>
-   <primary>pg_stat_bgwriter</primary>
-  </indexterm>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>backend_start</structfield> <type>timestamp with time zone</type>
+      </para>
+      <para>
+       Time when this process was started, i.e., when the
+       client connected to this WAL sender
+      </para></entry>
+     </row>
 
-  <para>
-   The <structname>pg_stat_bgwriter</structname> view will always have a
-   single row, containing global data for the cluster.
-  </para>
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+       <structfield>backend_xmin</structfield> <type>xid</type>
+      </para>
+      <para>
+       This standby's <literal>xmin</literal> horizon reported
+       by <xref linkend="guc-hot-standby-feedback"/>.
+      </para></entry>
+     </row>
 
-  <table id="pg-stat-bgwriter-view" xreflabel="pg_stat_bgwriter">
-   <title><structname>pg_stat_bgwriter</structname> View</title>
-   <tgroup cols="1">
-    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       Column Type
+       <structfield>state</structfield> <type>text</type>
       </para>
       <para>
-       Description
+       Current WAL sender state.
+       Possible values are:
+       <itemizedlist>
+        <listitem>
+         <para>
+          <literal>startup</literal>: This WAL sender is starting up.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>catchup</literal>: This WAL sender's connected standby is
+          catching up with the primary.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>streaming</literal>: This WAL sender is streaming changes
+          after its connected standby server has caught up with the primary.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>backup</literal>: This WAL sender is sending a backup.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>stopping</literal>: This WAL sender is stopping.
+         </para>
+        </listitem>
+       </itemizedlist>
       </para></entry>
      </row>
-    </thead>
 
-    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>checkpoints_timed</structfield> <type>bigint</type>
+       <structfield>sent_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Number of scheduled checkpoints that have been performed
+       Last write-ahead log location sent on this connection
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>checkpoints_req</structfield> <type>bigint</type>
+       <structfield>write_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Number of requested checkpoints that have been performed
+       Last write-ahead log location written to disk by this standby
+       server
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>checkpoint_write_time</structfield> <type>double precision</type>
+       <structfield>flush_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Total amount of time that has been spent in the portion of
-       checkpoint processing where files are written to disk, in milliseconds
+       Last write-ahead log location flushed to disk by this standby
+       server
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>checkpoint_sync_time</structfield> <type>double precision</type>
+       <structfield>replay_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Total amount of time that has been spent in the portion of
-       checkpoint processing where files are synchronized to disk, in
-       milliseconds
+       Last write-ahead log location replayed into the database on this
+       standby server
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>buffers_checkpoint</structfield> <type>bigint</type>
+       <structfield>write_lag</structfield> <type>interval</type>
       </para>
       <para>
-       Number of buffers written during checkpoints
+       Time elapsed between flushing recent WAL locally and receiving
+       notification that this standby server has written it (but not yet
+       flushed it or applied it).  This can be used to gauge the delay that
+       <literal>synchronous_commit</literal> level
+       <literal>remote_write</literal> incurred while committing if this
+       server was configured as a synchronous standby.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>buffers_clean</structfield> <type>bigint</type>
+       <structfield>flush_lag</structfield> <type>interval</type>
       </para>
       <para>
-       Number of buffers written by the background writer
+       Time elapsed between flushing recent WAL locally and receiving
+       notification that this standby server has written and flushed it
+       (but not yet applied it).  This can be used to gauge the delay that
+       <literal>synchronous_commit</literal> level
+       <literal>on</literal> incurred while committing if this
+       server was configured as a synchronous standby.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>maxwritten_clean</structfield> <type>bigint</type>
+       <structfield>replay_lag</structfield> <type>interval</type>
       </para>
       <para>
-       Number of times the background writer stopped a cleaning
-       scan because it had written too many buffers
+       Time elapsed between flushing recent WAL locally and receiving
+       notification that this standby server has written, flushed and
+       applied it.  This can be used to gauge the delay that
+       <literal>synchronous_commit</literal> level
+       <literal>remote_apply</literal> incurred while committing if this
+       server was configured as a synchronous standby.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>buffers_backend</structfield> <type>bigint</type>
+       <structfield>sync_priority</structfield> <type>integer</type>
       </para>
       <para>
-       Number of buffers written directly by a backend
+       Priority of this standby server for being chosen as the
+       synchronous standby in a priority-based synchronous replication.
+       This has no effect in a quorum-based synchronous replication.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>buffers_backend_fsync</structfield> <type>bigint</type>
+       <structfield>sync_state</structfield> <type>text</type>
       </para>
       <para>
-       Number of times a backend had to execute its own
-       <function>fsync</function> call (normally the background writer handles those
-       even when the backend does its own write)
+       Synchronous state of this standby server.
+       Possible values are:
+       <itemizedlist>
+        <listitem>
+         <para>
+          <literal>async</literal>: This standby server is asynchronous.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>potential</literal>: This standby server is now asynchronous,
+          but can potentially become synchronous if one of current
+          synchronous ones fails.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>sync</literal>: This standby server is synchronous.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>quorum</literal>: This standby server is considered as a candidate
+          for quorum standbys.
+         </para>
+        </listitem>
+       </itemizedlist>
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>buffers_alloc</structfield> <type>bigint</type>
+       <structfield>reply_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Number of buffers allocated
+       Send time of last reply message received from standby server
       </para></entry>
      </row>
+    </tbody>
+   </tgroup>
+  </table>
+
+  <para>
+   The lag times reported in the <structname>pg_stat_replication</structname>
+   view are measurements of the time taken for recent WAL to be written,
+   flushed and replayed and for the sender to know about it.  These times
+   represent the commit delay that was (or would have been) introduced by each
+   synchronous commit level, if the remote server was configured as a
+   synchronous standby.  For an asynchronous standby, the
+   <structfield>replay_lag</structfield> column approximates the delay
+   before recent transactions became visible to queries.  If the standby
+   server has entirely caught up with the sending server and there is no more
+   WAL activity, the most recently measured lag times will continue to be
+   displayed for a short time and then show NULL.
+  </para>
+
+  <para>
+   Lag times work automatically for physical replication. Logical decoding
+   plugins may optionally emit tracking messages; if they do not, the tracking
+   mechanism will simply display NULL lag.
+  </para>
 
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
-      </para>
-      <para>
-       Time at which these statistics were last reset
-      </para></entry>
-     </row>
-    </tbody>
-   </tgroup>
-  </table>
+  <note>
+   <para>
+    The reported lag times are not predictions of how long it will take for
+    the standby to catch up with the sending server assuming the current
+    rate of replay.  Such a system would show similar times while new WAL is
+    being generated, but would differ when the sender becomes idle.  In
+    particular, when the standby has caught up completely,
+    <structname>pg_stat_replication</structname> shows the time taken to
+    write, flush and replay the most recent reported WAL location rather than
+    zero as some users might expect.  This is consistent with the goal of
+    measuring synchronous commit and transaction visibility delays for
+    recent write transactions.
+    To reduce confusion for users expecting a different model of lag, the
+    lag columns revert to NULL after a short time on a fully replayed idle
+    system. Monitoring systems should choose whether to represent this
+    as missing data, zero or continue to display the last known value.
+   </para>
+  </note>
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-wal-view">
-   <title><structname>pg_stat_wal</structname></title>
+ <sect2 id="monitoring-pg-stat-replication-slots-view">
+  <title><structname>pg_stat_replication_slots</structname></title>
 
   <indexterm>
-   <primary>pg_stat_wal</primary>
+   <primary>pg_stat_replication_slots</primary>
   </indexterm>
 
   <para>
-   The <structname>pg_stat_wal</structname> view will always have a
-   single row, containing data about WAL activity of the cluster.
+   The <structname>pg_stat_replication_slots</structname> view will contain
+   one row per logical replication slot, showing statistics about its usage.
   </para>
 
-  <table id="pg-stat-wal-view" xreflabel="pg_stat_wal">
-   <title><structname>pg_stat_wal</structname> View</title>
+  <table id="pg-stat-replication-slots-view" xreflabel="pg_stat_replication_slots">
+   <title><structname>pg_stat_replication_slots</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       Column Type
-      </para>
-      <para>
-       Description
+        Column Type
+       </para>
+       <para>
+        Description
       </para></entry>
      </row>
     </thead>
@@ -3784,126 +3993,147 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_records</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Total number of WAL records generated
+        <structfield>slot_name</structfield> <type>text</type>
+       </para>
+       <para>
+        A unique, cluster-wide identifier for the replication slot
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_fpi</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Total number of WAL full page images generated
+        <structfield>spill_txns</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of transactions spilled to disk once the memory used by
+        logical decoding to decode changes from WAL has exceeded
+        <literal>logical_decoding_work_mem</literal>. The counter gets
+        incremented for both top-level transactions and subtransactions.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_bytes</structfield> <type>numeric</type>
-      </para>
-      <para>
-       Total amount of WAL generated in bytes
+        <structfield>spill_count</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of times transactions were spilled to disk while decoding
+        changes from WAL for this slot. This counter is incremented each time
+        a transaction is spilled, and the same transaction may be spilled
+        multiple times.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_buffers_full</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of times WAL data was written to disk because WAL buffers became full
+        <structfield>spill_bytes</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Amount of decoded transaction data spilled to disk while performing
+        decoding of changes from WAL for this slot. This and other spill
+        counters can be used to gauge the I/O which occurred during logical
+        decoding and allow tuning <literal>logical_decoding_work_mem</literal>.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_write</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of times WAL buffers were written out to disk via
-       <function>XLogWrite</function> request.
-       See <xref linkend="wal-configuration"/> for more information about
-       the internal WAL function <function>XLogWrite</function>.
-      </para></entry>
+        <structfield>stream_txns</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of in-progress transactions streamed to the decoding output
+        plugin after the memory used by logical decoding to decode changes
+        from WAL for this slot has exceeded
+        <literal>logical_decoding_work_mem</literal>. Streaming only
+        works with top-level transactions (subtransactions can't be streamed
+        independently), so the counter is not incremented for subtransactions.
+       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_sync</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of times WAL files were synced to disk via
-       <function>issue_xlog_fsync</function> request
-       (if <xref linkend="guc-fsync"/> is <literal>on</literal> and
-       <xref linkend="guc-wal-sync-method"/> is either
-       <literal>fdatasync</literal>, <literal>fsync</literal> or
-       <literal>fsync_writethrough</literal>, otherwise zero).
-       See <xref linkend="wal-configuration"/> for more information about
-       the internal WAL function <function>issue_xlog_fsync</function>.
+        <structfield>stream_count</structfield><type>bigint</type>
+       </para>
+       <para>
+        Number of times in-progress transactions were streamed to the decoding
+        output plugin while decoding changes from WAL for this slot. This
+        counter is incremented each time a transaction is streamed, and the
+        same transaction may be streamed multiple times.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_write_time</structfield> <type>double precision</type>
-      </para>
-      <para>
-       Total amount of time spent writing WAL buffers to disk via
-       <function>XLogWrite</function> request, in milliseconds
-       (if <xref linkend="guc-track-wal-io-timing"/> is enabled,
-       otherwise zero).  This includes the sync time when
-       <varname>wal_sync_method</varname> is either
-       <literal>open_datasync</literal> or <literal>open_sync</literal>.
-      </para></entry>
+        <structfield>stream_bytes</structfield><type>bigint</type>
+       </para>
+       <para>
+        Amount of transaction data decoded for streaming in-progress
+        transactions to the decoding output plugin while decoding changes from
+        WAL for this slot. This and other streaming counters for this slot can
+        be used to tune <literal>logical_decoding_work_mem</literal>.
+       </para>
+      </entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>wal_sync_time</structfield> <type>double precision</type>
-      </para>
-      <para>
-       Total amount of time spent syncing WAL files to disk via
-       <function>issue_xlog_fsync</function> request, in milliseconds
-       (if <varname>track_wal_io_timing</varname> is enabled,
-       <varname>fsync</varname> is <literal>on</literal>, and
-       <varname>wal_sync_method</varname> is either
-       <literal>fdatasync</literal>, <literal>fsync</literal> or
-       <literal>fsync_writethrough</literal>, otherwise zero).
-      </para></entry>
+        <structfield>total_txns</structfield> <type>bigint</type>
+       </para>
+       <para>
+        Number of decoded transactions sent to the decoding output plugin for
+        this slot. This counts top-level transactions only, and is not incremented
+        for subtransactions. Note that this includes the transactions that are
+        streamed and/or spilled.
+       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
-      </para>
-      <para>
-       Time at which these statistics were last reset
-      </para></entry>
+        <structfield>total_bytes</structfield><type>bigint</type>
+       </para>
+       <para>
+        Amount of transaction data decoded for sending transactions to the
+        decoding output plugin while decoding changes from WAL for this slot.
+        Note that this includes data that is streamed and/or spilled.
+       </para>
+      </entry>
      </row>
-     </tbody>
+
+     <row>
+      <entry role="catalog_table_entry"><para role="column_definition">
+        <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
+       </para>
+       <para>
+        Time at which these statistics were last reset
+       </para></entry>
+     </row>
+    </tbody>
    </tgroup>
   </table>
 
-</sect2>
+ </sect2>
 
- <sect2 id="monitoring-pg-stat-database-view">
-  <title><structname>pg_stat_database</structname></title>
+ <sect2 id="monitoring-pg-stat-slru-view">
+  <title><structname>pg_stat_slru</structname></title>
 
   <indexterm>
-   <primary>pg_stat_database</primary>
+   <primary>SLRU</primary>
+  </indexterm>
+
+  <indexterm>
+   <primary>pg_stat_slru</primary>
   </indexterm>
 
   <para>
-   The <structname>pg_stat_database</structname> view will contain one row
-   for each database in the cluster, plus one for shared objects, showing
-   database-wide statistics.
+   <productname>PostgreSQL</productname> accesses certain on-disk information
+   via <firstterm>SLRU</firstterm> (simple least-recently-used) caches.
+   The <structname>pg_stat_slru</structname> view will contain
+   one row for each tracked SLRU cache, showing statistics about access
+   to cached pages.
   </para>
 
-  <table id="pg-stat-database-view" xreflabel="pg_stat_database">
-   <title><structname>pg_stat_database</structname> View</title>
+  <table id="pg-stat-slru-view" xreflabel="pg_stat_slru">
+   <title><structname>pg_stat_slru</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -3919,293 +4149,316 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>datid</structfield> <type>oid</type>
+       <structfield>name</structfield> <type>text</type>
       </para>
       <para>
-       OID of this database, or 0 for objects belonging to a shared
-       relation
+       Name of the SLRU
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>datname</structfield> <type>name</type>
+       <structfield>blks_zeroed</structfield> <type>bigint</type>
       </para>
       <para>
-       Name of this database, or <literal>NULL</literal> for shared
-       objects.
+       Number of blocks zeroed during initializations
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>numbackends</structfield> <type>integer</type>
+       <structfield>blks_hit</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of backends currently connected to this database, or
-       <literal>NULL</literal> for shared objects.  This is the only column
-       in this view that returns a value reflecting current state; all other
-       columns return the accumulated values since the last reset.
+       Number of times disk blocks were found already in the SLRU,
+       so that a read was not necessary (this only includes hits in the
+       SLRU, not the operating system's file system cache)
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>xact_commit</structfield> <type>bigint</type>
+       <structfield>blks_read</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of transactions in this database that have been
-       committed
+       Number of disk blocks read for this SLRU
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>xact_rollback</structfield> <type>bigint</type>
+       <structfield>blks_written</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of transactions in this database that have been
-       rolled back
+       Number of disk blocks written for this SLRU
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blks_read</structfield> <type>bigint</type>
+       <structfield>blks_exists</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of disk blocks read in this database
+       Number of blocks checked for existence for this SLRU
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blks_hit</structfield> <type>bigint</type>
+       <structfield>flushes</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of times disk blocks were found already in the buffer
-       cache, so that a read was not necessary (this only includes hits in the
-       PostgreSQL buffer cache, not the operating system's file system cache)
+       Number of flushes of dirty data for this SLRU
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>tup_returned</structfield> <type>bigint</type>
+       <structfield>truncates</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of live rows fetched by sequential scans and index entries returned by index scans in this database
+       Number of truncates for this SLRU
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>tup_fetched</structfield> <type>bigint</type>
+       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Number of live rows fetched by index scans in this database
+       Time at which these statistics were last reset
       </para></entry>
      </row>
+    </tbody>
+   </tgroup>
+  </table>
+
+ </sect2>
+
+ <sect2 id="monitoring-pg-stat-ssl-view">
+  <title><structname>pg_stat_ssl</structname></title>
+
+  <indexterm>
+   <primary>pg_stat_ssl</primary>
+  </indexterm>
+
+  <para>
+   The <structname>pg_stat_ssl</structname> view will contain one row per
+   backend or WAL sender process, showing statistics about SSL usage on
+   this connection. It can be joined to <structname>pg_stat_activity</structname>
+   or <structname>pg_stat_replication</structname> on the
+   <structfield>pid</structfield> column to get more details about the
+   connection.
+  </para>
 
+  <table id="pg-stat-ssl-view" xreflabel="pg_stat_ssl">
+   <title><structname>pg_stat_ssl</structname> View</title>
+   <tgroup cols="1">
+    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>tup_inserted</structfield> <type>bigint</type>
+       Column Type
       </para>
       <para>
-       Number of rows inserted by queries in this database
+       Description
       </para></entry>
      </row>
+    </thead>
 
+    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>tup_updated</structfield> <type>bigint</type>
+       <structfield>pid</structfield> <type>integer</type>
       </para>
       <para>
-       Number of rows updated by queries in this database
+       Process ID of a backend or WAL sender process
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>tup_deleted</structfield> <type>bigint</type>
+       <structfield>ssl</structfield> <type>boolean</type>
       </para>
       <para>
-       Number of rows deleted by queries in this database
+       True if SSL is used on this connection
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>conflicts</structfield> <type>bigint</type>
+       <structfield>version</structfield> <type>text</type>
       </para>
       <para>
-       Number of queries canceled due to conflicts with recovery
-       in this database. (Conflicts occur only on standby servers; see
-       <link linkend="monitoring-pg-stat-database-conflicts-view">
-       <structname>pg_stat_database_conflicts</structname></link> for details.)
+       Version of SSL in use, or NULL if SSL is not in use
+       on this connection
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>temp_files</structfield> <type>bigint</type>
+       <structfield>cipher</structfield> <type>text</type>
       </para>
       <para>
-       Number of temporary files created by queries in this database.
-       All temporary files are counted, regardless of why the temporary file
-       was created (e.g., sorting or hashing), and regardless of the
-       <xref linkend="guc-log-temp-files"/> setting.
+       Name of SSL cipher in use, or NULL if SSL is not in use
+       on this connection
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>temp_bytes</structfield> <type>bigint</type>
+       <structfield>bits</structfield> <type>integer</type>
       </para>
       <para>
-       Total amount of data written to temporary files by queries in
-       this database. All temporary files are counted, regardless of why
-       the temporary file was created, and
-       regardless of the <xref linkend="guc-log-temp-files"/> setting.
+       Number of bits in the encryption algorithm used, or NULL
+       if SSL is not used on this connection
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>deadlocks</structfield> <type>bigint</type>
+       <structfield>client_dn</structfield> <type>text</type>
       </para>
       <para>
-       Number of deadlocks detected in this database
+       Distinguished Name (DN) field from the client certificate
+       used, or NULL if no client certificate was supplied or if SSL
+       is not in use on this connection. This field is truncated if the
+       DN field is longer than <symbol>NAMEDATALEN</symbol> (64 characters
+       in a standard build).
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>checksum_failures</structfield> <type>bigint</type>
+       <structfield>client_serial</structfield> <type>numeric</type>
       </para>
       <para>
-       Number of data page checksum failures detected in this
-       database (or on a shared object), or NULL if data checksums are not
-       enabled.
+       Serial number of the client certificate, or NULL if no client
+       certificate was supplied or if SSL is not in use on this connection.  The
+       combination of certificate serial number and certificate issuer uniquely
+       identifies a certificate (unless the issuer erroneously reuses serial
+       numbers).
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>checksum_last_failure</structfield> <type>timestamp with time zone</type>
+       <structfield>issuer_dn</structfield> <type>text</type>
       </para>
       <para>
-       Time at which the last data page checksum failure was detected in
-       this database (or on a shared object), or NULL if data checksums are not
-       enabled.
+       DN of the issuer of the client certificate, or NULL if no client
+       certificate was supplied or if SSL is not in use on this connection.
+       This field is truncated like <structfield>client_dn</structfield>.
       </para></entry>
      </row>
+    </tbody>
+   </tgroup>
+  </table>
+
+ </sect2>
+
+ <sect2 id="monitoring-pg-stat-subscription">
+  <title><structname>pg_stat_subscription</structname></title>
 
+  <indexterm>
+   <primary>pg_stat_subscription</primary>
+  </indexterm>
+
+  <table id="pg-stat-subscription" xreflabel="pg_stat_subscription">
+   <title><structname>pg_stat_subscription</structname> View</title>
+   <tgroup cols="1">
+    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blk_read_time</structfield> <type>double precision</type>
+       Column Type
       </para>
       <para>
-       Time spent reading data file blocks by backends in this database,
-       in milliseconds (if <xref linkend="guc-track-io-timing"/> is enabled,
-       otherwise zero)
+       Description
       </para></entry>
      </row>
+    </thead>
 
+    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blk_write_time</structfield> <type>double precision</type>
+       <structfield>subid</structfield> <type>oid</type>
       </para>
       <para>
-       Time spent writing data file blocks by backends in this database,
-       in milliseconds (if <xref linkend="guc-track-io-timing"/> is enabled,
-       otherwise zero)
+       OID of the subscription
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>session_time</structfield> <type>double precision</type>
+       <structfield>subname</structfield> <type>name</type>
       </para>
       <para>
-       Time spent by database sessions in this database, in milliseconds
-       (note that statistics are only updated when the state of a session
-       changes, so if sessions have been idle for a long time, this idle time
-       won't be included)
+       Name of the subscription
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>active_time</structfield> <type>double precision</type>
+       <structfield>pid</structfield> <type>integer</type>
       </para>
       <para>
-       Time spent executing SQL statements in this database, in milliseconds
-       (this corresponds to the states <literal>active</literal> and
-       <literal>fastpath function call</literal> in
-       <link linkend="monitoring-pg-stat-activity-view">
-       <structname>pg_stat_activity</structname></link>)
+       Process ID of the subscription worker process
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>idle_in_transaction_time</structfield> <type>double precision</type>
+       <structfield>relid</structfield> <type>oid</type>
       </para>
       <para>
-       Time spent idling while in a transaction in this database, in milliseconds
-       (this corresponds to the states <literal>idle in transaction</literal> and
-       <literal>idle in transaction (aborted)</literal> in
-       <link linkend="monitoring-pg-stat-activity-view">
-       <structname>pg_stat_activity</structname></link>)
+       OID of the relation that the worker is synchronizing; null for the
+       main apply worker
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sessions</structfield> <type>bigint</type>
+       <structfield>received_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Total number of sessions established to this database
+       Last write-ahead log location received, the initial value of
+       this field being 0
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sessions_abandoned</structfield> <type>bigint</type>
+       <structfield>last_msg_send_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Number of database sessions to this database that were terminated
-       because connection to the client was lost
+       Send time of last message received from origin WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sessions_fatal</structfield> <type>bigint</type>
+       <structfield>last_msg_receipt_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Number of database sessions to this database that were terminated
-       by fatal errors
+       Receipt time of last message received from origin WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>sessions_killed</structfield> <type>bigint</type>
+       <structfield>latest_end_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Number of database sessions to this database that were terminated
-       by operator intervention
+       Last write-ahead log location reported to origin WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
+       <structfield>latest_end_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Time at which these statistics were last reset
+       Time of last write-ahead log location reported to origin WAL
+       sender
       </para></entry>
      </row>
     </tbody>
@@ -4214,23 +4467,20 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-database-conflicts-view">
-  <title><structname>pg_stat_database_conflicts</structname></title>
+ <sect2 id="monitoring-pg-stat-subscription-stats">
+  <title><structname>pg_stat_subscription_stats</structname></title>
 
   <indexterm>
-   <primary>pg_stat_database_conflicts</primary>
+   <primary>pg_stat_subscription_stats</primary>
   </indexterm>
 
   <para>
-   The <structname>pg_stat_database_conflicts</structname> view will contain
-   one row per database, showing database-wide statistics about
-   query cancels occurring due to conflicts with recovery on standby servers.
-   This view will only contain information on standby servers, since
-   conflicts do not occur on primary servers.
+   The <structname>pg_stat_subscription_stats</structname> view will contain
+   one row per subscription.
   </para>
 
-  <table id="pg-stat-database-conflicts-view" xreflabel="pg_stat_database_conflicts">
-   <title><structname>pg_stat_database_conflicts</structname> View</title>
+  <table id="pg-stat-subscription-stats" xreflabel="pg_stat_subscription_stats">
+   <title><structname>pg_stat_subscription_stats</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -4246,69 +4496,47 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>datid</structfield> <type>oid</type>
-      </para>
-      <para>
-       OID of a database
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>datname</structfield> <type>name</type>
-      </para>
-      <para>
-       Name of this database
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>confl_tablespace</structfield> <type>bigint</type>
+       <structfield>subid</structfield> <type>oid</type>
       </para>
       <para>
-       Number of queries in this database that have been canceled due to
-       dropped tablespaces
+       OID of the subscription
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>confl_lock</structfield> <type>bigint</type>
+       <structfield>subname</structfield> <type>name</type>
       </para>
       <para>
-       Number of queries in this database that have been canceled due to
-       lock timeouts
+       Name of the subscription
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>confl_snapshot</structfield> <type>bigint</type>
+       <structfield>apply_error_count</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of queries in this database that have been canceled due to
-       old snapshots
+       Number of times an error occurred while applying changes
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>confl_bufferpin</structfield> <type>bigint</type>
+       <structfield>sync_error_count</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of queries in this database that have been canceled due to
-       pinned buffers
+       Number of times an error occurred during the initial table
+       synchronization
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>confl_deadlock</structfield> <type>bigint</type>
+       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Number of queries in this database that have been canceled due to
-       deadlocks
+       Time at which these statistics were last reset
       </para></entry>
      </row>
     </tbody>
@@ -4317,25 +4545,22 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-all-tables-view">
-  <title><structname>pg_stat_all_tables</structname></title>
+ <sect2 id="monitoring-pg-stat-user-functions-view">
+  <title><structname>pg_stat_user_functions</structname></title>
 
   <indexterm>
-   <primary>pg_stat_all_tables</primary>
+   <primary>pg_stat_user_functions</primary>
   </indexterm>
 
   <para>
-   The <structname>pg_stat_all_tables</structname> view will contain
-   one row for each table in the current database (including TOAST
-   tables), showing statistics about accesses to that specific table. The
-   <structname>pg_stat_user_tables</structname> and
-   <structname>pg_stat_sys_tables</structname> views
-   contain the same information,
-   but filtered to only show user and system tables respectively.
+   The <structname>pg_stat_user_functions</structname> view will contain
+   one row for each tracked function, showing statistics about executions of
+   that function.  The <xref linkend="guc-track-functions"/> parameter
+   controls exactly which functions are tracked.
   </para>
-
-  <table id="pg-stat-all-tables-view" xreflabel="pg_stat_all_tables">
-   <title><structname>pg_stat_all_tables</structname> View</title>
+
+  <table id="pg-stat-user-functions-view" xreflabel="pg_stat_user_functions">
+   <title><structname>pg_stat_user_functions</structname> View</title>
    <tgroup cols="1">
     <thead>
      <row>
@@ -4351,10 +4576,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
     <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>relid</structfield> <type>oid</type>
+       <structfield>funcid</structfield> <type>oid</type>
       </para>
       <para>
-       OID of a table
+       OID of a function
       </para></entry>
      </row>
 
@@ -4363,378 +4588,365 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        <structfield>schemaname</structfield> <type>name</type>
       </para>
       <para>
-       Name of the schema that this table is in
+       Name of the schema this function is in
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>relname</structfield> <type>name</type>
+       <structfield>funcname</structfield> <type>name</type>
       </para>
       <para>
-       Name of this table
+       Name of this function
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>seq_scan</structfield> <type>bigint</type>
+       <structfield>calls</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of sequential scans initiated on this table
+       Number of times this function has been called
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_seq_scan</structfield> <type>timestamptz</type>
+       <structfield>total_time</structfield> <type>double precision</type>
       </para>
       <para>
-       The time of the last sequential scan on this table, based on the
-       most recent transaction stop time
+       Total time spent in this function and all other functions
+       called by it, in milliseconds
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>seq_tup_read</structfield> <type>bigint</type>
+       <structfield>self_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Number of live rows fetched by sequential scans
+       Total time spent in this function itself, not including
+       other functions called by it, in milliseconds
       </para></entry>
      </row>
+    </tbody>
+   </tgroup>
+  </table>
 
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>idx_scan</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of index scans initiated on this table
-      </para></entry>
-     </row>
+ </sect2>
 
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_idx_scan</structfield> <type>timestamptz</type>
-      </para>
-      <para>
-       The time of the last index scan on this table, based on the
-       most recent transaction stop time
-      </para></entry>
-     </row>
+ <sect2 id="monitoring-pg-stat-wal-view">
+   <title><structname>pg_stat_wal</structname></title>
 
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>idx_tup_fetch</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of live rows fetched by index scans
-      </para></entry>
-     </row>
+  <indexterm>
+   <primary>pg_stat_wal</primary>
+  </indexterm>
+
+  <para>
+   The <structname>pg_stat_wal</structname> view will always have a
+   single row, containing data about WAL activity of the cluster.
+  </para>
 
+  <table id="pg-stat-wal-view" xreflabel="pg_stat_wal">
+   <title><structname>pg_stat_wal</structname> View</title>
+   <tgroup cols="1">
+    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_tup_ins</structfield> <type>bigint</type>
+       Column Type
       </para>
       <para>
-       Number of rows inserted
+       Description
       </para></entry>
      </row>
+    </thead>
 
+    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_tup_upd</structfield> <type>bigint</type>
+       <structfield>wal_records</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of rows updated (includes <link linkend="storage-hot">HOT updated rows</link>)
+       Total number of WAL records generated
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_tup_del</structfield> <type>bigint</type>
+       <structfield>wal_fpi</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of rows deleted
+       Total number of WAL full page images generated
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_tup_hot_upd</structfield> <type>bigint</type>
+       <structfield>wal_bytes</structfield> <type>numeric</type>
       </para>
       <para>
-       Number of rows HOT updated (i.e., with no separate index
-       update required)
+       Total amount of WAL generated in bytes
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_live_tup</structfield> <type>bigint</type>
+       <structfield>wal_buffers_full</structfield> <type>bigint</type>
       </para>
       <para>
-       Estimated number of live rows
+       Number of times WAL data was written to disk because WAL buffers became full
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_dead_tup</structfield> <type>bigint</type>
+       <structfield>wal_write</structfield> <type>bigint</type>
       </para>
       <para>
-       Estimated number of dead rows
+       Number of times WAL buffers were written out to disk via
+       <function>XLogWrite</function> request.
+       See <xref linkend="wal-configuration"/> for more information about
+       the internal WAL function <function>XLogWrite</function>.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_mod_since_analyze</structfield> <type>bigint</type>
+       <structfield>wal_sync</structfield> <type>bigint</type>
       </para>
       <para>
-       Estimated number of rows modified since this table was last analyzed
+       Number of times WAL files were synced to disk via
+       <function>issue_xlog_fsync</function> request
+       (if <xref linkend="guc-fsync"/> is <literal>on</literal> and
+       <xref linkend="guc-wal-sync-method"/> is either
+       <literal>fdatasync</literal>, <literal>fsync</literal> or
+       <literal>fsync_writethrough</literal>, otherwise zero).
+       See <xref linkend="wal-configuration"/> for more information about
+       the internal WAL function <function>issue_xlog_fsync</function>.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>n_ins_since_vacuum</structfield> <type>bigint</type>
+       <structfield>wal_write_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Estimated number of rows inserted since this table was last vacuumed
+       Total amount of time spent writing WAL buffers to disk via
+       <function>XLogWrite</function> request, in milliseconds
+       (if <xref linkend="guc-track-wal-io-timing"/> is enabled,
+       otherwise zero).  This includes the sync time when
+       <varname>wal_sync_method</varname> is either
+       <literal>open_datasync</literal> or <literal>open_sync</literal>.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_vacuum</structfield> <type>timestamp with time zone</type>
+       <structfield>wal_sync_time</structfield> <type>double precision</type>
       </para>
       <para>
-       Last time at which this table was manually vacuumed
-       (not counting <command>VACUUM FULL</command>)
+       Total amount of time spent syncing WAL files to disk via
+       <function>issue_xlog_fsync</function> request, in milliseconds
+       (if <varname>track_wal_io_timing</varname> is enabled,
+       <varname>fsync</varname> is <literal>on</literal>, and
+       <varname>wal_sync_method</varname> is either
+       <literal>fdatasync</literal>, <literal>fsync</literal> or
+       <literal>fsync_writethrough</literal>, otherwise zero).
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_autovacuum</structfield> <type>timestamp with time zone</type>
+       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Last time at which this table was vacuumed by the autovacuum
-       daemon
+       Time at which these statistics were last reset
       </para></entry>
      </row>
+     </tbody>
+   </tgroup>
+  </table>
+
+</sect2>
+
+ <sect2 id="monitoring-pg-stat-wal-receiver-view">
+  <title><structname>pg_stat_wal_receiver</structname></title>
+
+  <indexterm>
+   <primary>pg_stat_wal_receiver</primary>
+  </indexterm>
+
+  <para>
+   The <structname>pg_stat_wal_receiver</structname> view will contain only
+   one row, showing statistics about the WAL receiver from that receiver's
+   connected server.
+  </para>
 
+  <table id="pg-stat-wal-receiver-view" xreflabel="pg_stat_wal_receiver">
+   <title><structname>pg_stat_wal_receiver</structname> View</title>
+   <tgroup cols="1">
+    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_analyze</structfield> <type>timestamp with time zone</type>
+       Column Type
       </para>
       <para>
-       Last time at which this table was manually analyzed
+       Description
       </para></entry>
      </row>
+    </thead>
 
+    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_autoanalyze</structfield> <type>timestamp with time zone</type>
+       <structfield>pid</structfield> <type>integer</type>
       </para>
       <para>
-       Last time at which this table was analyzed by the autovacuum
-       daemon
+       Process ID of the WAL receiver process
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>vacuum_count</structfield> <type>bigint</type>
+       <structfield>status</structfield> <type>text</type>
       </para>
       <para>
-       Number of times this table has been manually vacuumed
-       (not counting <command>VACUUM FULL</command>)
+       Activity status of the WAL receiver process
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>autovacuum_count</structfield> <type>bigint</type>
+       <structfield>receive_start_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Number of times this table has been vacuumed by the autovacuum
-       daemon
+       First write-ahead log location used when WAL receiver is
+       started
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>analyze_count</structfield> <type>bigint</type>
+       <structfield>receive_start_tli</structfield> <type>integer</type>
       </para>
       <para>
-       Number of times this table has been manually analyzed
+       First timeline number used when WAL receiver is started
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>autoanalyze_count</structfield> <type>bigint</type>
+       <structfield>written_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Number of times this table has been analyzed by the autovacuum
-       daemon
+       Last write-ahead log location already received and written to disk,
+       but not flushed. This should not be used for data integrity checks.
       </para></entry>
      </row>
-    </tbody>
-   </tgroup>
-  </table>
-
- </sect2>
-
- <sect2 id="monitoring-pg-stat-all-indexes-view">
-  <title><structname>pg_stat_all_indexes</structname></title>
-
-  <indexterm>
-   <primary>pg_stat_all_indexes</primary>
-  </indexterm>
-
-  <para>
-   The <structname>pg_stat_all_indexes</structname> view will contain
-   one row for each index in the current database,
-   showing statistics about accesses to that specific index. The
-   <structname>pg_stat_user_indexes</structname> and
-   <structname>pg_stat_sys_indexes</structname> views
-   contain the same information,
-   but filtered to only show user and system indexes respectively.
-  </para>
 
-  <table id="pg-stat-all-indexes-view" xreflabel="pg_stat_all_indexes">
-   <title><structname>pg_stat_all_indexes</structname> View</title>
-   <tgroup cols="1">
-    <thead>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       Column Type
+       <structfield>flushed_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Description
+       Last write-ahead log location already received and flushed to
+       disk, the initial value of this field being the first log location used
+       when WAL receiver is started
       </para></entry>
      </row>
-    </thead>
 
-    <tbody>
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>relid</structfield> <type>oid</type>
+       <structfield>received_tli</structfield> <type>integer</type>
       </para>
       <para>
-       OID of the table for this index
+       Timeline number of last write-ahead log location received and
+       flushed to disk, the initial value of this field being the timeline
+       number of the first log location used when WAL receiver is started
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>indexrelid</structfield> <type>oid</type>
+       <structfield>last_msg_send_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       OID of this index
+       Send time of last message received from origin WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>schemaname</structfield> <type>name</type>
+       <structfield>last_msg_receipt_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Name of the schema this index is in
+       Receipt time of last message received from origin WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>relname</structfield> <type>name</type>
+       <structfield>latest_end_lsn</structfield> <type>pg_lsn</type>
       </para>
       <para>
-       Name of the table for this index
+       Last write-ahead log location reported to origin WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>indexrelname</structfield> <type>name</type>
+       <structfield>latest_end_time</structfield> <type>timestamp with time zone</type>
       </para>
       <para>
-       Name of this index
+       Time of last write-ahead log location reported to origin WAL sender
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>idx_scan</structfield> <type>bigint</type>
+       <structfield>slot_name</structfield> <type>text</type>
       </para>
       <para>
-       Number of index scans initiated on this index
+       Replication slot name used by this WAL receiver
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>last_idx_scan</structfield> <type>timestamptz</type>
+       <structfield>sender_host</structfield> <type>text</type>
       </para>
       <para>
-       The time of the last scan on this index, based on the
-       most recent transaction stop time
+       Host of the <productname>PostgreSQL</productname> instance
+       this WAL receiver is connected to. This can be a host name,
+       an IP address, or a directory path if the connection is via
+       Unix socket.  (The path case can be distinguished because it
+       will always be an absolute path, beginning with <literal>/</literal>.)
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>idx_tup_read</structfield> <type>bigint</type>
+       <structfield>sender_port</structfield> <type>integer</type>
       </para>
       <para>
-       Number of index entries returned by scans on this index
+       Port number of the <productname>PostgreSQL</productname> instance
+       this WAL receiver is connected to.
       </para></entry>
      </row>
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>idx_tup_fetch</structfield> <type>bigint</type>
+       <structfield>conninfo</structfield> <type>text</type>
       </para>
       <para>
-       Number of live table rows fetched by simple index scans using this
-       index
+       Connection string used by this WAL receiver,
+       with security-sensitive fields obfuscated.
       </para></entry>
      </row>
     </tbody>
    </tgroup>
   </table>
 
-  <para>
-   Indexes can be used by simple index scans, <quote>bitmap</quote> index scans,
-   and the optimizer.  In a bitmap scan
-   the output of several indexes can be combined via AND or OR rules,
-   so it is difficult to associate individual heap row fetches
-   with specific indexes when a bitmap scan is used.  Therefore, a bitmap
-   scan increments the
-   <structname>pg_stat_all_indexes</structname>.<structfield>idx_tup_read</structfield>
-   count(s) for the index(es) it uses, and it increments the
-   <structname>pg_stat_all_tables</structname>.<structfield>idx_tup_fetch</structfield>
-   count for the table, but it does not affect
-   <structname>pg_stat_all_indexes</structname>.<structfield>idx_tup_fetch</structfield>.
-   The optimizer also accesses indexes to check for supplied constants
-   whose values are outside the recorded range of the optimizer statistics
-   because the optimizer statistics might be stale.
-  </para>
-
-  <note>
-   <para>
-    The <structfield>idx_tup_read</structfield> and <structfield>idx_tup_fetch</structfield> counts
-    can be different even without any use of bitmap scans,
-    because <structfield>idx_tup_read</structfield> counts
-    index entries retrieved from the index while <structfield>idx_tup_fetch</structfield>
-    counts live rows fetched from the table.  The latter will be less if any
-    dead or not-yet-committed rows are fetched using the index, or if any
-    heap fetches are avoided by means of an index-only scan.
-   </para>
-  </note>
-
  </sect2>
 
  <sect2 id="monitoring-pg-statio-all-tables-view">
@@ -5051,218 +5263,6 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-user-functions-view">
-  <title><structname>pg_stat_user_functions</structname></title>
-
-  <indexterm>
-   <primary>pg_stat_user_functions</primary>
-  </indexterm>
-
-  <para>
-   The <structname>pg_stat_user_functions</structname> view will contain
-   one row for each tracked function, showing statistics about executions of
-   that function.  The <xref linkend="guc-track-functions"/> parameter
-   controls exactly which functions are tracked.
-  </para>
-
-  <table id="pg-stat-user-functions-view" xreflabel="pg_stat_user_functions">
-   <title><structname>pg_stat_user_functions</structname> View</title>
-   <tgroup cols="1">
-    <thead>
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       Column Type
-      </para>
-      <para>
-       Description
-      </para></entry>
-     </row>
-    </thead>
-
-    <tbody>
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>funcid</structfield> <type>oid</type>
-      </para>
-      <para>
-       OID of a function
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>schemaname</structfield> <type>name</type>
-      </para>
-      <para>
-       Name of the schema this function is in
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>funcname</structfield> <type>name</type>
-      </para>
-      <para>
-       Name of this function
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>calls</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of times this function has been called
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>total_time</structfield> <type>double precision</type>
-      </para>
-      <para>
-       Total time spent in this function and all other functions
-       called by it, in milliseconds
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>self_time</structfield> <type>double precision</type>
-      </para>
-      <para>
-       Total time spent in this function itself, not including
-       other functions called by it, in milliseconds
-      </para></entry>
-     </row>
-    </tbody>
-   </tgroup>
-  </table>
-
- </sect2>
-
- <sect2 id="monitoring-pg-stat-slru-view">
-  <title><structname>pg_stat_slru</structname></title>
-
-  <indexterm>
-   <primary>SLRU</primary>
-  </indexterm>
-
-  <indexterm>
-   <primary>pg_stat_slru</primary>
-  </indexterm>
-
-  <para>
-   <productname>PostgreSQL</productname> accesses certain on-disk information
-   via <firstterm>SLRU</firstterm> (simple least-recently-used) caches.
-   The <structname>pg_stat_slru</structname> view will contain
-   one row for each tracked SLRU cache, showing statistics about access
-   to cached pages.
-  </para>
-
-  <table id="pg-stat-slru-view" xreflabel="pg_stat_slru">
-   <title><structname>pg_stat_slru</structname> View</title>
-   <tgroup cols="1">
-    <thead>
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       Column Type
-      </para>
-      <para>
-       Description
-      </para></entry>
-     </row>
-    </thead>
-
-    <tbody>
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>name</structfield> <type>text</type>
-      </para>
-      <para>
-       Name of the SLRU
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blks_zeroed</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of blocks zeroed during initializations
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blks_hit</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of times disk blocks were found already in the SLRU,
-       so that a read was not necessary (this only includes hits in the
-       SLRU, not the operating system's file system cache)
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blks_read</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of disk blocks read for this SLRU
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blks_written</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of disk blocks written for this SLRU
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>blks_exists</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of blocks checked for existence for this SLRU
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>flushes</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of flushes of dirty data for this SLRU
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>truncates</structfield> <type>bigint</type>
-      </para>
-      <para>
-       Number of truncates for this SLRU
-      </para></entry>
-     </row>
-
-     <row>
-      <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
-      </para>
-      <para>
-       Time at which these statistics were last reset
-      </para></entry>
-     </row>
-    </tbody>
-   </tgroup>
-  </table>
-
- </sect2>
-
  <sect2 id="monitoring-stats-functions">
   <title>Statistics Functions</title>
 
-- 
1.8.3.1

