Content-Length: 267218 | pFad | http://github.com/postgrespro/postgres_cluster/commit/a6dec195b5d310d6f719a0f31a9f9578b6c64af2

04 Fix bug in 2PC xact stats reporter · postgrespro/postgres_cluster@a6dec19 · GitHub
Skip to content

Commit a6dec19

Browse files
committed
Fix bug in 2PC xact stats reporter
1 parent a7d5bb1 commit a6dec19

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,6 +2218,13 @@ pgstat_twophase_postcommit(TransactionId xid, uint16 info,
22182218
pgstat_info->t_counts.t_tuples_deleted += rec->tuples_deleted;
22192219
pgstat_info->t_counts.t_truncated = rec->t_truncated;
22202220

2221+
if (rec->t_truncated)
2222+
{
2223+
/* forget live/dead stats seen by backend thus far */
2224+
pgstat_info->t_counts.t_delta_live_tuples = 0;
2225+
pgstat_info->t_counts.t_delta_dead_tuples = 0;
2226+
}
2227+
22212228
pgstat_info->t_counts.t_delta_live_tuples +=
22222229
rec->tuples_inserted - rec->tuples_deleted;
22232230
pgstat_info->t_counts.t_delta_dead_tuples +=

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/a6dec195b5d310d6f719a0f31a9f9578b6c64af2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy