4

I have a Postgresql 9.1+134wheezy4 running on Debian 7 Wheezy. From 2015-02-07 on (I guess it has been backported then, see below) I regularly see the following line in /var/log/postgresql/postgresql-9.1-main.log:

2015-02-07 11:08:33 CET LOG:  using stale statistics instead of current ones because stats collector is not responding

I shows a up few times a day, nothing spectacular or to worry about. But I don't get the meaning of the line and couldn't find documentation about it. It is mentioned in the changelogs for 9.3.6 and 9.4.1:

  • Change "pgstat wait timeout" warning message to be LOG level, and rephrase it to be more understandable (Tom Lane)

    This message was originally thought to be essentially a can't-happen case, but it occurs often enough on our slower buildfarm members to be a nuisance. Reduce it to LOG level, and expend a bit more effort on the wording: it now reads "using stale statistics instead of current ones because stats collector is not responding".

Unfortunately, it does not explain the meaning. I also had WARNING: pgstat wait timeout until it changed in February as often as the new message. The information on the log line are also not helpful/constructive. A frequent advice is to restart the server or to remove the shared memory segment.

These are the logs for a postgresql restart:

2015-05-25 17:01:39 CEST LOG:  using stale statistics instead of current ones because stats collector is not responding
2015-05-25 18:00:04 CEST LOG:  received fast shutdown request
2015-05-25 18:00:04 CEST LOG:  aborting any active transactions
2015-05-25 18:00:04 CEST LOG:  autovacuum launcher shutting down
2015-05-25 18:00:04 CEST LOG:  shutting down
2015-05-25 18:00:04 CEST LOG:  database system is shut down
2015-05-25 18:00:06 CEST LOG:  database system was shut down at 2015-05-25 18:00:04 CEST
2015-05-25 18:00:06 CEST LOG:  database system is ready to accept connections
2015-05-25 18:00:06 CEST LOG:  autovacuum launcher started
2015-05-25 18:00:07 CEST LOG:  incomplete startup packet

Could it mean that the statistics collector is somehow broken or misconfigured? What is the reason for this behaviour and how can it be avoided?

sebix
  • 4,313
  • 2
  • 29
  • 47
  • http://stackoverflow.com/questions/22648029/postgres-replication-incomplete-startup-packet – PersianGulf May 25 '15 at 16:47
  • @MohsenPahlevanzadeh So you think I should do `select pg_start_backup('initial_backup');` wait a bit and then `select pg_stop_backup();`? – sebix May 25 '15 at 17:52
  • Massively excessive load is the only time I've seen this. Do you have many thousands of active connections on a small machine? – Craig Ringer May 26 '15 at 01:00
  • I only search for you and recommend you search before any post. – PersianGulf May 26 '15 at 14:42
  • @CraigRinger I have nearly zero requests and 75% of total memory is free all the time. – sebix May 26 '15 at 15:12
  • My Postgres 9.4.4 on Cygwin is doing this too, spamming my terminal with `WARNING: could not open statistics file "pg_stat_tmp/global.stat": Device or resource busy` and one line of the error in the title. It is currently idle yet I get this error. – Chloe Oct 05 '15 at 21:04

0 Answers0