patternsqlMinor
“using stale statistics instead of current ones because stats collector is not responding”
Viewed 0 times
collectorrespondingstatsinsteadbecausestatisticsstaleusingcurrentones
Problem
My postgresql 9.5 logs shows every minute the message:
using stale statistics instead of current ones because stats collector is not responding
Except a post on serverfault which is not helpfull and seems related to standby databases setup (which is not my case), I don't find anything to solve this.
What's the meaning of this? How can I solve that?
Additional information based on Greda's reply:
I have also tried to tweak the postgresql.conf parameters as follows
The error message is still there.
P.S: I fully understand that's not a severe error, but it floods my logs, and I have the fear to not see important messages...
Some additional observation:
Can that never ending process be the root causes of my problem? In that case, since I need to have that proccess running, do I have to tweak something on the server?
Edit:
I had a never ending process connected to the db. I've tried to stop it, and it doesn't helps.
My postgresql.conf file is available there
using stale statistics instead of current ones because stats collector is not responding
Except a post on serverfault which is not helpfull and seems related to standby databases setup (which is not my case), I don't find anything to solve this.
What's the meaning of this? How can I solve that?
Additional information based on Greda's reply:
- I have 4 CPU, and in routine less than 5% of 1 CPU is used
- I have 32Gb RAM, and in routine ~ 500Mb are used
- This is not a VM
- This runs Ubuntu 14.04.3 LTS/Linux 3.13.0 SMB x86/64
I have also tried to tweak the postgresql.conf parameters as follows
- shared_buffers: 1024MB
- work_mem: 10MB
- maintenance_work_mem: 1024MB
- effective_cache_size: 4GB
The error message is still there.
P.S: I fully understand that's not a severe error, but it floods my logs, and I have the fear to not see important messages...
Some additional observation:
VACUUM FULL VERBOSE ANALYZEdoesn't helps
- I have a never ending proccess connected to the database. When this is running, the
VACUUM FULL VERBOSE ANALYZEseems blocked.
Can that never ending process be the root causes of my problem? In that case, since I need to have that proccess running, do I have to tweak something on the server?
Edit:
I had a never ending process connected to the db. I've tried to stop it, and it doesn't helps.
My postgresql.conf file is available there
Solution
This basically means your (virtual?) machine is too slow or overloaded, because the statistics collector background task is being starved. It is running with a lower priority by default, because you do not want it to disrupt normal database operations (too much).
If you can afford it, add some more CPUs to it and make sure you have plenty of RAM.
Technically though, this is not a severe error - your queries will run, but may be using less than optimal execution plans because they did not see an update to table statistics in a while.
If you want to, you can always force an update of statistics for the most commonly changed tables by running the ANALYZE or VACUUM ANALYZE statements on those.
If you can afford it, add some more CPUs to it and make sure you have plenty of RAM.
Technically though, this is not a severe error - your queries will run, but may be using less than optimal execution plans because they did not see an update to table statistics in a while.
If you want to, you can always force an update of statistics for the most commonly changed tables by running the ANALYZE or VACUUM ANALYZE statements on those.
Context
StackExchange Database Administrators Q#126826, answer score: 4
Revisions (0)
No revisions yet.