【问题标题】:WARNING: could not open statistics file "pg_stat_tmp/global.stat": Stale file handle警告:无法打开统计文件“pg_stat_tmp/global.stat”:过时的文件句柄
【发布时间】:2020-11-02 16:04:01
【问题描述】:

我在 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 从三个副本中挂载的

【问题讨论】:

标签: database postgresql kubernetes-ingress glusterfs


【解决方案1】:

如果该问题只是偶尔发生,则可能是 I/O 过载的迹象,但本身并无害。

如果您一直收到该消息,则说明您的统计信息收集器有问题,您应该找出并解决问题,因为统计信息对于数据库的运行状况(自动清理)很重要。

【讨论】:

  • 如何解决这个问题?关于这个问题的更多信息?是的,我偶尔会得到它。日志已满并出现此警告
  • 从这里很难说。可能是network problems,可能是 I/O 问题。
  • 我也有类似的问题,和I/O问题无关
  • @user352290 当然,there are other causes
【解决方案2】:

更新:这个问题来自 gluserfs,glusterfs 尚未解决该问题https://github.com/gluster/glusterfs/issues/502

【讨论】:

    猜你喜欢
    • 2021-05-25
    • 2022-11-10
    • 2023-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-21
    • 1970-01-01
    相关资源
    最近更新 更多