This oversight caused the reported times to accumulate in an O(N^2)
fashion the longer a backend runs.
return;
/*
- * Report accumulated xact commit/rollback and I/O timings whenever we send
- * a normal tabstat message
+ * Report and reset accumulated xact commit/rollback and I/O timings
+ * whenever we send a normal tabstat message
*/
if (OidIsValid(tsmsg->m_databaseid))
{
tsmsg->m_block_time_write = pgStatBlockTimeWrite;
pgStatXactCommit = 0;
pgStatXactRollback = 0;
+ pgStatBlockTimeRead = 0;
+ pgStatBlockTimeWrite = 0;
}
else
{