aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2020-10-29 09:11:51 +0530
committerAmit Kapila <akapila@postgresql.org>2020-10-29 09:11:51 +0530
commit8e90ec5580d5345fef31005d7cc2215ba2125070 (patch)
tree0aeb74ce7a64214df6920964fa6ceea9f4e0086d /doc/src
parent94bc27b57680b4e757577e3f5b65dc32f96d33c1 (diff)
downloadpostgresql-8e90ec5580d5345fef31005d7cc2215ba2125070.tar.gz
postgresql-8e90ec5580d5345fef31005d7cc2215ba2125070.zip
Track statistics for streaming of changes from ReorderBuffer.
This adds the statistics about transactions streamed to the decoding output plugin from ReorderBuffer. Users can query the pg_stat_replication_slots view to check these stats and call pg_stat_reset_replication_slot to reset the stats of a particular slot. Users can pass NULL in pg_stat_reset_replication_slot to reset stats of all the slots. Commit 9868167500 has added the basic infrastructure to capture the stats of slot and this commit extends the statistics collector to track additional information about slots. Bump the catversion as we have added new columns in the catalog entry. Author: Ajin Cherian and Amit Kapila Reviewed-by: Sawada Masahiko and Dilip Kumar Discussion: https://postgr.es/m/CAA4eK1+chpEomLzgSoky-D31qev19AmECNiEAietPQUGEFhtVA@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/monitoring.sgml38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 313e44ed549..98e19954538 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -2634,6 +2634,44 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
<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 of changes from WAL for this
+ slot exceeds <literal>logical_decoding_work_mem</literal>. Streaming only
+ works with toplevel transactions (subtransactions can't be streamed
+ independently), so the counter does not get incremented for subtransactions.
+ </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. Transactions
+ may get streamed repeatedly, and this counter gets incremented on every
+ such invocation.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>stream_bytes</structfield><type>bigint</type>
+ </para>
+ <para>
+ Amount of decoded in-progress transaction data streamed 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 gauge the network 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>stats_reset</structfield> <type>timestamp with time zone</type>
</para>
<para>