Обсуждение: pgsql: Fix the computation of slot stats for 'total_bytes'.

Поиск
Список
Период
Сортировка

pgsql: Fix the computation of slot stats for 'total_bytes'.

От
Amit Kapila
Дата:
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(-)