pgsql: Fix the computation of slot stats for 'total_bytes'. - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Fix the computation of slot stats for 'total_bytes'.
Date
Msg-id E1ldNvy-0003UY-Qi@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix the computation of slot stats for 'total_bytes'.

Previously, we were using the size of all the changes present in
ReorderBuffer to compute total_bytes after decoding a transaction and that
can lead to counting some of the transactions' changes more than once. Fix
it by using the size of the changes decoded for a transaction to compute
'total_bytes'.

Author: Sawada Masahiko
Reviewed-by: Vignesh C, Amit Kapila
Discussion: https://postgr.es/m/20210319185247.ldebgpdaxsowiflw@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/205f466282be11ec97506f73341e47b72e0aee5d

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 39 ++++++++++++-------------
1 file changed, 19 insertions(+), 20 deletions(-)


pgsql-committers by date:

Previous
From: Alexander Korotkov
Date:
Subject: pgsql: Make websearch_to_tsquery() parse text in quotes as a single tok
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Factor out system call names from error messages