2

I am running postgres in Kubernetes cluster and seeing this warning.

What kind of problem/warning it is? How can I fix this?

Here is full log on container startup:

 .. PostgreSQL Database directory appears to contain a database; Skipping initialization
 .. UTC [1] LOG:  starting PostgreSQL 13.0 (Debian 13.0-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
... UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
... UTC [1] LOG:  listening on IPv6 address "::", port 5432
... UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
... UTC [24] LOG:  database system was shut down at 2020-11-02 10:16:05 UTC
... UTC [1] LOG:  database system is ready to accept connections
... UTC [28] WARNING:  could not open statistics file "pg_stat_tmp/global.stat": Stale file handle

Here the volume is mounted by glusterfs from three replica

user8462556
  • 369
  • 6
  • 13

2 Answers2

3

If that problem occurs only occasionally, it can be a sign of I/O overload, but is harmless as such.

If you get that message all the time, something is wrong with your statistics collector, and you should find and fix the problem, because statistics are important for the health of your database (autovacuum).

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • 2
    how to fix this? more info about this problem? Yes, i am getting it occasionally. Log is full with this warning – user8462556 Nov 05 '20 at 11:13
  • 1
    Hard to say from here. Could be [network problems](https://www.cybertec-postgresql.com/en/stale-statistics-cause-table-bloat/), could be I/O problems. – Laurenz Albe Nov 05 '20 at 11:46
  • I have a similar problem as well and its nothing to do with I/O problems – user352290 Feb 10 '21 at 03:24
  • @user352290 Sure, [there are other causes](https://www.cybertec-postgresql.com/en/stale-statistics-cause-table-bloat/). – Laurenz Albe Feb 10 '21 at 06:54
0

Update: This problem comes from gluserfs and issue is not yet resolved by glusterfs https://github.com/gluster/glusterfs/issues/502

user8462556
  • 369
  • 6
  • 13