【问题标题】:Postgresql startup error : "Could not flush dirty data: Input/output error"Postgresql 启动错误:“无法刷新脏数据:输入/输出错误”
【发布时间】:2020-03-04 11:43:53
【问题描述】:

我在 RHEL 7 上使用 Postgresql 服务器 v11.4。这是我的负载测试环境,我的数据库大小已达到 1TB。

尽管 FS 上大约 1TB 有大约 2GB 可用空间,但昨晚服务器出现错误“设备上没有剩余空间”。

2020-03-03 17:11:37.202 IST pocdb schema1 109 2020-02-27 15:21:11 IST pid:27464 xid:0 ip:10.236.113.37 ERROR:  could not access status of transaction 0
2020-03-03 17:11:37.202 IST pocdb schema1 110 2020-02-27 15:21:11 IST pid:27464 xid:0 ip:10.236.113.37 DETAIL:  Could not write to file "pg_commit_ts/5198" at offset 90112: No space left on device.
2020-03-03 17:11:37.202 IST pocdb schema1 111 2020-02-27 15:21:11 IST pid:27464 xid:0 ip:10.236.113.37 STATEMENT:  UPDATE TEST SET STATUS = $1, LAST_UPDATE_DATE = CURRENT_TIMESTAMP WHERE ID = $2 AND STATUS = $4
2020-03-03 17:11:37.203 IST pocdb schema1 197 2020-02-27 15:23:51 IST pid:30398 xid:0 ip:10.236.113.36 **ERROR:  could not access status of transaction 0**
2020-03-03 17:11:37.203 IST pocdb schema1 198 2020-02-27 15:23:51 IST pi2020-03-03 17:14:29.937 IST   13 2020-02-27 15:15:14 IST pid:17705 xid:0 ip: **LOG:  database system is shut down**

我曾多次尝试重新启动 postgres 服务,但现在失败并显示以下消息

2020-03-04 12:31:19.469 IST   1 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: LOG:  database system shutdown was interrupted; last known up at 2020-03-04 11:49:08 IST
2020-03-04 12:31:19.704 IST   2 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: LOG:  database system was not properly shut down; automatic recovery in progress
2020-03-04 12:31:19.706 IST   3 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: LOG:  redo starts at 136E/9E042C78
2020-03-04 12:32:07.312 IST   4 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: LOG:  invalid record length at 1371/6CF69FD8: wanted 24, got 0
2020-03-04 12:32:07.312 IST   5 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: LOG:  redo done at 1371/6CF69F88
2020-03-04 12:32:07.312 IST   6 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: LOG:  last completed transaction was at log time 2020-03-03 17:13:36.683476+02
2020-03-04 12:32:07.319 IST   7 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: LOG:  checkpoint starting: end-of-recovery immediate
2020-03-04 12:32:07.964 IST   8 2020-03-04 12:31:19 IST pid:21703 xid:0 ip: **PANIC:  could not flush dirty data: Input/output error**
2020-03-04 12:33:14.712 IST   7 2020-03-04 12:31:18 IST pid:21697 xid:0 ip: **LOG:  startup process (PID 21703) was terminated by signal 6: Aborted**
2020-03-04 12:33:14.712 IST   8 2020-03-04 12:31:18 IST pid:21697 xid:0 ip: LOG:  **aborting startup due to startup process failure**
2020-03-04 12:33:16.358 IST   9 2020-03-04 12:31:18 IST pid:21697 xid:0 ip: LOG:  **database system is shut down**

您能否建议启动 postgres 服务器的方法。

【问题讨论】:

    标签: postgresql crash startup ioerror


    【解决方案1】:

    在 /var/log/messages 中是否有 I/O 错误?如果有的话,您应该首先调查并修复这些问题。

    【讨论】:

    • 是的,检查并怀疑磁盘损坏错误,您的想法是什么
    • 3 月 4 日 16:03:21 illin2608 邮政主管:2020-03-04 16:03:21.840 IST 5 2020-03-04 16:03:21 IST pid:14409 xid:0 ip:LOG :将日志输出重定向到日志收集器进程 Mar 4 16:03:21 illin2608 postmaster: 2020-03-04 16:03:21.840 IST 6 2020-03-04 16:03:21 IST pid:14409 xid:0 ip: HINT :未来的日志输出将出现在目录“/oravl02/postgres/log”中。 3 月 4 日 16:04:02 illin2608 内核:blk_update_request:I/O 错误,dev dm-10,扇区 188876808
    • 3 月 4 日 16:04:02 illin2608 内核:EXT4-fs 错误(设备 dm-53):ext4_wait_block_bitmap:516:comm postmaster:无法读取块位图 - block_group = 12081,block_bitmap = 395837441 3 月 4 日16:04:02 illin2608 内核:EXT4-fs:2 个回调被抑制 3 月 4 日 16:04:02 illin2608 内核:EXT4-fs (dm-53):inode 11274721 在逻辑偏移量 96256 处的延迟块分配失败,最大块 14错误 5 Mar 4 16:04:02 illin2608 kernel: EXT4-fs (dm-53): 这不应该发生!!数据将丢失
    • 3 月 4 日 16:04:02 illin2608 abrt-hook-ccpp:用户 26 的进程 14418(postgres)被 SIGABRT 杀死 - 转储核心 3 月 4 日 16:04:11 illin2608 abrt-hook-ccpp:写入错误:设备上没有剩余空间 3 月 4 日 16:05:01 illin2608 内核:blk_update_request:I/O 错误,开发 dm-10,扇区 0 3 月 4 日 16:05:02 illin2608 内核:blk_update_request:I/O 错误,开发dm-10,扇区 0 3 月 4 日 16:05:02 illin2608 内核:blk_update_request:I/O 错误,开发 dm-10,扇区 0 3 月 4 日 16:05:02 illin2608 内核:blk_update_request:I/O 错误,开发 dm- 10,扇区 0
    • 3 月 4 日 16:05:04 illin2608 abrt-hook-ccpp:写入错误 '/var/spool/abrt/ccpp-2020-03-04-16:04:02-14418.new/ coredump' Mar 4 16:05:07 illin2608 systemd:postgresql-11.service:主进程退出,code=exited,status=1/FAILURE Mar 4 16:05:07 illin2608 systemd:无法启动 PostgreSQL 11 数据库服务器。 3 月 4 日 16:05:07 illin2608 systemd:单元 postgresql-11.service 进入失败状态。 3 月 4 日 16:05:07 illin2608 systemd: postgresql-11.service failed.
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-11-09
    • 2020-05-05
    • 1970-01-01
    • 2018-11-23
    • 1970-01-01
    • 1970-01-01
    • 2018-12-06
    相关资源
    最近更新 更多