PostgreSQL启动失败

本来运行正常的koji系统中的PostgreSQL突然启动失败,仅在systemd status -l和journalctl -xeu中看不出明显的失败原因。通过检查/var/lib/pgsql/data/log下的日志,发现是一个record不对。

通过搜索,找到这个回答:https://stackoverflow.com/a/8812934

使用如下命令刷新纪录后,启动正常:


1
2
3
4
5
# Postgres >= 10
pg_resetwal -f DATADIR

# Postgres < 10
pg_resetxlog -f DATADIR

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据