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

Commit781bc12

Browse files
committed
Fix stats_fetch_consistency with stats for fixed-numbered objects
This impacts the statistics retrieved in transactions for the followingviews when updating the value of stats_fetch_consistency, leading tobehaviors contrary to what is documented since6059946 as an updateof this parameter should discard all statistics snapshot data:- pg_stat_archiver- pg_stat_bgwriter- pg_stat_checkpointer- pg_stat_io- pg_stat_slru- pg_stat_walFor example, updating stats_fetch_consistency from "snapshot" to "cache"in a transaction did not re-fetch any fresh data, using data cached fromthe time when "snapshot" was in use.Author: Shinya KatoDiscussion:https://postgr.es/m/d77fc5190d4dbe1738d77231488e768b@oss.nttdata.comBackpatch-through: 15
1 parentf33e832 commit781bc12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/utils/activity/pgstat.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,9 @@ pgstat_snapshot_fixed(PgStat_Kind kind)
943943
Assert(pgstat_is_kind_valid(kind));
944944
Assert(pgstat_get_kind_info(kind)->fixed_amount);
945945

946+
if (force_stats_snapshot_clear)
947+
pgstat_clear_snapshot();
948+
946949
if (pgstat_fetch_consistency==PGSTAT_FETCH_CONSISTENCY_SNAPSHOT)
947950
pgstat_build_snapshot();
948951
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp