我正在 Kubernetes 集群中运行 postgres 并看到此警告。
这是什么类型的问题/警告?我该如何解决这个问题?
这是容器启动的完整日志:
.. 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
这里卷是由 glusterfs 从三个副本挂载的
最佳答案
如果该问题只是偶尔发生,则可能是 I/O 过载的迹象,但本身是无害的。
如果您一直收到该消息,则说明您的统计收集器出现问题,您应该找到并修复问题,因为统计信息对于数据库 (autovacuum) 的健康状况非常重要。
关于database - 警告 : could not open statistics file "pg_stat_tmp/global.stat": Stale file handle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64649061/