我有一台centos 7.9机器,我使用的是postgres13。我在一个驱动器上有一个程序写入另一个驱动器上的 Postgres DB 文件。他们曾经在同一个驱动器上。自从我移动了程序后,我就看到 Postgres 服务崩溃后应用程序崩溃了。看来 Postgres 抱怨没有记忆。
2023-08-03 07:13:24.555 CEST [19273] LOG: using stale statistics instead of current ones because stats collector is not responding
2023-08-03 07:13:24.557 CEST [19274] LOG: could not write temporary statistics file "pg_stat_tmp/db_23048.tmp": No space left on device
2023-08-03 07:13:24.557 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
2023-08-03 07:13:24.557 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
我一直在阅读这个错误。现阶段我不知道是否:
- 另一个程序正在暂时占用该空间。在现阶段我认为情况并非如此。
- 大型 SQL 查询导致此问题。
- 大型 SQL 查询以及二进制文件位于与数据库不同的驱动器上的事实
- 如果应用程序有问题。这是最重要的。自从我将二进制文件移动到不同的驱动器后,我没有遇到任何问题,
我的问题是,这是否是由上述第3条引起的?我还可以更改 .conf 文件中的设置来解决此问题并获取更多与此相关的调试数据。
这是日志的其余部分
sudo cat /var/lib/pgsql/13/data/log/postgresql-Thu.log
2023-08-03 02:14:02.319 CEST [19263] LOG: starting PostgreSQL 13.11 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
2023-08-03 02:14:02.320 CEST [19263] LOG: listening on IPv4 address "127.0.0.1", port 5432
2023-08-03 02:14:02.323 CEST [19263] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-08-03 02:14:02.330 CEST [19263] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-08-03 02:14:02.336 CEST [19266] LOG: database system shutdown was interrupted; last known up at 2023-08-02 21:41:18 CEST
2023-08-03 02:14:02.517 CEST [19266] LOG: database system was not properly shut down; automatic recovery in progress
2023-08-03 02:14:02.523 CEST [19266] LOG: redo starts at 0/1B80C1E0
2023-08-03 02:14:02.524 CEST [19266] LOG: invalid record length at 0/1B812A70: wanted 24, got 0
2023-08-03 02:14:02.524 CEST [19266] LOG: redo done at 0/1B812A38
2023-08-03 02:14:02.571 CEST [19263] LOG: database system is ready to accept connections
2023-08-03 07:10:14.385 CEST [19274] LOG: could not write temporary statistics file "pg_stat_tmp/db_23048.tmp": No space left on device
2023-08-03 07:11:14.362 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
2023-08-03 07:11:14.363 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
2023-08-03 07:11:24.482 CEST [19273] LOG: using stale statistics instead of current ones because stats collector is not responding
2023-08-03 07:11:24.485 CEST [19274] LOG: could not write temporary statistics file "pg_stat_tmp/db_23048.tmp": No space left on device
2023-08-03 07:11:24.485 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
2023-08-03 07:11:24.485 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
2023-08-03 07:11:34.607 CEST [26445] LOG: using stale statistics instead of current ones because stats collector is not responding
2023-08-03 07:12:14.402 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
2023-08-03 07:12:14.402 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
2023-08-03 07:12:24.546 CEST [19273] LOG: using stale statistics instead of current ones because stats collector is not responding
2023-08-03 07:12:24.548 CEST [19274] LOG: could not write temporary statistics file "pg_stat_tmp/db_23048.tmp": No space left on device
2023-08-03 07:12:24.549 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
2023-08-03 07:12:24.549 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
2023-08-03 07:12:34.689 CEST [27514] LOG: using stale statistics instead of current ones because stats collector is not responding
2023-08-03 07:13:14.434 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
2023-08-03 07:13:14.434 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
2023-08-03 07:13:24.555 CEST [19273] LOG: using stale statistics instead of current ones because stats collector is not responding
2023-08-03 07:13:24.557 CEST [19274] LOG: could not write temporary statistics file "pg_stat_tmp/db_23048.tmp": No space left on device
2023-08-03 07:13:24.557 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/db_0.tmp": No space left on device
2023-08-03 07:13:24.557 CEST [19274] LOG: could not close temporary statistics file "pg_stat_tmp/global.tmp": No space left on device
2023-08-03 07:13:34.664 CEST [28580] LOG: using stale statistics instead of current ones because stats collector is not responding
2023-08-03 07:14:05.961 CEST [19270] PANIC: could not write to file "pg_logical/replorigin_checkpoint.tmp": No space left on device
2023-2023-08-03 07:38:20.160 CEST [26786] LOG: starting PostgreSQL 13.11 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
2023-08-03 07:38:20.160 CEST [26786] LOG: listening on IPv4 address "127.0.0.1", port 5432
2023-08-03 07:38:20.166 CEST [26786] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-08-03 07:38:20.178 CEST [26786] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-08-03 07:38:20.186 CEST [26790] LOG: database system shutdown was interrupted; last known up at 2023-08-03 07:14:07 CEST
2023-08-03 07:38:20.373 CEST [26790] LOG: database system was not properly shut down; automatic recovery in progress
2023-08-03 07:38:20.382 CEST [26790] LOG: redo starts at 0/1B9ED838
2023-08-03 07:38:20.382 CEST [26790] LOG: invalid record length at 0/1B9F4870: wanted 24, got 0
2023-08-03 07:38:20.382 CEST [26790] LOG: redo done at 0/1B9F4838
2023-08-03 07:38:20.437 CEST [26786] LOG: database system is ready to accept connections
任何帮助将不胜感激 !