mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +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:
@ -402,6 +402,17 @@ struct ReorderBuffer
|
||||
|
||||
/* memory accounting */
|
||||
Size size;
|
||||
|
||||
/*
|
||||
* Statistics about transactions spilled to disk.
|
||||
*
|
||||
* A single transaction may be spilled repeatedly, which is why we keep
|
||||
* two different counters. For spilling, the transaction counter includes
|
||||
* both toplevel transactions and subtransactions.
|
||||
*/
|
||||
int64 spillCount; /* spill-to-disk invocation counter */
|
||||
int64 spillTxns; /* number of transactions spilled to disk */
|
||||
int64 spillBytes; /* amount of data spilled to disk */
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user