1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Track statistics for spilling of changes from ReorderBuffer.

This adds the statistics about transactions spilled to disk from
ReorderBuffer.  Users can query the pg_stat_replication view to check
these stats.

Author: Tomas Vondra, with bug-fixes and minor changes by Dilip Kumar
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com
This commit is contained in:
Amit Kapila
2019-11-16 18:24:00 +05:30
parent 168d206400
commit 9290ad198b
9 changed files with 101 additions and 9 deletions

View File

@ -1972,6 +1972,26 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
<entry><type>timestamp with time zone</type></entry>
<entry>Send time of last reply message received from standby server</entry>
</row>
<row>
<entry><structfield>spill_bytes</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Amount of decoded transaction data spilled to disk.</entry>
</row>
<row>
<entry><structfield>spill_txns</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Number of transactions spilled to disk after the memory used by
logical decoding exceeds <literal>logical_decoding_work_mem</literal>. The
counter gets incremented both for toplevel transactions and
subtransactions.</entry>
</row>
<row>
<entry><structfield>spill_count</structfield></entry>
<entry><type>bigint</type></entry>
<entry>Number of times transactions were spilled to disk. Transactions
may get spilled repeatedly, and this counter gets incremented on every
such invocation.</entry>
</row>
</tbody>
</tgroup>
</table>