Skip to content

Commit a1a8d02

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 failures when the stats collector is exceptionally slow to respond, which it not infrequently is on some of the smaller/slower buildfarm members. This change does lose notice to an interactive user when his stats query is looking at out-of-date stats, but the majority opinion (not necessarily that of yours truly) is that WARNING messages would probably not get noticed anyway on heavily loaded production systems. A LOG message at least ensures that the problem is recorded somewhere where bulk auditing for the issue is possible. Also, instead of an untranslated "pgstat wait timeout" message, provide a translatable and hopefully more understandable message "using stale statistics instead of current ones because stats collector is not responding". The original text was written hastily under the assumption that it would never really happen in practice, which we now know to be unduly optimistic. Back-patch to all active branches, since we've seen the buildfarm issue in all branches.
1 parent cebb3f0 commit a1a8d02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3694,7 +3694,9 @@ backend_read_statsfile(void)
36943694
}
36953695

36963696
if (count >= PGSTAT_POLL_LOOP_COUNT)
3697-
elog(WARNING, "pgstat wait timeout");
3697+
ereport(LOG,
3698+
(errmsg("using stale statistics instead of current ones "
3699+
"because stats collector is not responding")));
36983700

36993701
/* Autovacuum launcher wants stats about all databases */
37003702
if (IsAutoVacuumLauncherProcess())

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy