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

Commit0c90442

Browse files
committed
Reset all database-level stats in pgstat_recv_resetcounter().
We were failing to zero out some pg_stat_database counters that havebeen added since the initial pgstats coding. This is a bug, but notback-patching the fix since changing this behavior in a minor releaseseems a cure worse than the disease.Report and patch by Tomas Vondra.
1 parent5132ad8 commit0c90442

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎src/backend/postmaster/pgstat.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4006,10 +4006,21 @@ pgstat_recv_resetcounter(PgStat_MsgResetcounter *msg, int len)
40064006

40074007
dbentry->tables=NULL;
40084008
dbentry->functions=NULL;
4009+
4010+
/*
4011+
* Reset database-level stats too. This should match the initialization
4012+
* code in pgstat_get_db_entry().
4013+
*/
40094014
dbentry->n_xact_commit=0;
40104015
dbentry->n_xact_rollback=0;
40114016
dbentry->n_blocks_fetched=0;
40124017
dbentry->n_blocks_hit=0;
4018+
dbentry->n_tuples_returned=0;
4019+
dbentry->n_tuples_fetched=0;
4020+
dbentry->n_tuples_inserted=0;
4021+
dbentry->n_tuples_updated=0;
4022+
dbentry->n_tuples_deleted=0;
4023+
dbentry->last_autovac_time=0;
40134024

40144025
memset(&hash_ctl,0,sizeof(hash_ctl));
40154026
hash_ctl.keysize=sizeof(Oid);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp