Update replication statistics after every stream/spill.
authorAmit Kapila <akapila@postgresql.org>
Thu, 6 May 2021 05:51:26 +0000 (11:21 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 6 May 2021 05:51:26 +0000 (11:21 +0530)
commit592f00f8dec68038301467a904ac514eddabf6cd
tree5bc251cc881aa61308c32e9996a9ca770acf5279
parent7f2e10baa2482494dbcf70e0ae6f0469771e0b4c
Update replication statistics after every stream/spill.

Currently, replication slot statistics are updated at prepare, commit, and
rollback. Now, if the transaction is interrupted the stats might not get
updated. Fixed this by updating replication statistics after every
stream/spill.

In passing update the docs to change the description of some of the slot
stats.

Author: Vignesh C, Sawada Masahiko
Reviewed-by: Amit Kapila
Discussion: http://postgr.es/m/20210319185247.ldebgpdaxsowiflw@alap3.anarazel.de
doc/src/sgml/monitoring.sgml
src/backend/replication/logical/decode.c
src/backend/replication/logical/reorderbuffer.c
src/include/replication/reorderbuffer.h