Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcdbad24

Browse files
committed
Clear I/O timing counters after sending them to the stats collector.
This oversight caused the reported times to accumulate in an O(N^2)fashion the longer a backend runs.
1 parent05dd9fb commitcdbad24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/postmaster/pgstat.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,8 @@ pgstat_send_tabstat(PgStat_MsgTabstat *tsmsg)
784784
return;
785785

786786
/*
787-
* Report accumulated xact commit/rollback and I/O timings whenever we send
788-
* a normal tabstat message
787+
* Reportand resetaccumulated xact commit/rollback and I/O timings
788+
*whenever we senda normal tabstat message
789789
*/
790790
if (OidIsValid(tsmsg->m_databaseid))
791791
{
@@ -795,6 +795,8 @@ pgstat_send_tabstat(PgStat_MsgTabstat *tsmsg)
795795
tsmsg->m_block_time_write=pgStatBlockTimeWrite;
796796
pgStatXactCommit=0;
797797
pgStatXactRollback=0;
798+
pgStatBlockTimeRead=0;
799+
pgStatBlockTimeWrite=0;
798800
}
799801
else
800802
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp