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

Commit33b7235

Browse files
committed
Adjust "pgstat wait timeout" message to be a translatable LOG message.
Per discussion, change the log level of this message to be LOG not WARNING.The main point of this change is to avoid causing buildfarm run failureswhen the stats collector is exceptionally slow to respond, which it notinfrequently is on some of the smaller/slower buildfarm members.This change does lose notice to an interactive user when his stats queryis looking at out-of-date stats, but the majority opinion (not necessarilythat of yours truly) is that WARNING messages would probably not getnoticed anyway on heavily loaded production systems. A LOG message atleast ensures that the problem is recorded somewhere where bulk auditingfor the issue is possible.Also, instead of an untranslated "pgstat wait timeout" message, providea translatable and hopefully more understandable message "using stalestatistics instead of current ones because stats collector is notresponding". The original text was written hastily under the assumptionthat it would never really happen in practice, which we now know to beunduly optimistic.Back-patch to all active branches, since we've seen the buildfarm issuein all branches.
1 parent821386a commit33b7235

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
@@ -3253,7 +3253,7 @@ PgstatCollectorMain(int argc, char *argv[])
32533253
* first water, but until somebody wants to debug exactly what's
32543254
* happening there, this is the best we can do. The two-second
32553255
* timeout matches our pre-9.2 behavior, and needs to be short enough
3256-
* to not provoke "pgstat wait timeout" complaints from
3256+
* to not provoke "using stale statistics" complaints from
32573257
* backend_read_statsfile.
32583258
*/
32593259
wr=WaitLatchOrSocket(&pgStatLatch,
@@ -3981,7 +3981,9 @@ backend_read_statsfile(void)
39813981
}
39823982

39833983
if (count >=PGSTAT_POLL_LOOP_COUNT)
3984-
elog(WARNING,"pgstat wait timeout");
3984+
ereport(LOG,
3985+
(errmsg("using stale statistics instead of current ones "
3986+
"because stats collector is not responding")));
39853987

39863988
/* Autovacuum launcher wants stats about all databases */
39873989
if (IsAutoVacuumLauncherProcess())

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp