diff options
author | Amit Kapila <akapila@postgresql.org> | 2021-04-16 07:34:43 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2021-04-16 07:34:43 +0530 |
commit | f5fc2f5b23d1b1dff60f8ca5dc211161df47eda4 (patch) | |
tree | 440595580ef83eac4609e3cd74c2fe43bc73f28b /src/include/replication/reorderbuffer.h | |
parent | 1bf946bd43e545b86e567588b791311fe4e36a8c (diff) |
Add information of total data processed to replication slot stats.
This adds the statistics about total transactions count and total
transaction data logically sent to the decoding output plugin from
ReorderBuffer. Users can query the pg_stat_replication_slots view to check
these stats.
Suggested-by: Andres Freund
Author: Vignesh C and Amit Kapila
Reviewed-by: Sawada Masahiko, Amit Kapila
Discussion: https://postgr.es/m/20210319185247.ldebgpdaxsowiflw@alap3.anarazel.de
Diffstat (limited to 'src/include/replication/reorderbuffer.h')
-rw-r--r-- | src/include/replication/reorderbuffer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h index 565a961d6ab..bfab8303ee7 100644 --- a/src/include/replication/reorderbuffer.h +++ b/src/include/replication/reorderbuffer.h @@ -618,6 +618,13 @@ struct ReorderBuffer int64 streamTxns; /* number of transactions streamed */ int64 streamCount; /* streaming invocation counter */ int64 streamBytes; /* amount of data streamed */ + + /* + * Statistics about all the transactions sent to the decoding output + * plugin + */ + int64 totalTxns; /* total number of transactions sent */ + int64 totalBytes; /* total amount of data sent */ }; |