postgresql错误PANIC:找不到有效的检查点记录

前端之家收集整理的这篇文章主要介绍了postgresql错误PANIC:找不到有效的检查点记录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我加载postgres服务器(v9.0.1)我得到一个恐慌,阻止它开始:

PANIC: could not locate a valid checkpoint record

如何解决这个问题?

它正在查找可能不存在或已损坏的事务日志中的检查点记录。您可以通过运行以确定是否是这种情况:
pg_resetxlog DATADIR

如果事务日志损坏,您会看到如下消息:

The database server was not shut down cleanly. Resetting the
transaction log might cause data to be lost. If you want to proceed
anyway,use -f to force reset.

然后,您可以按照说明运行,并使用-f强制更新:

pg_resetxlog -f DATADIR

这应该重置事务日志,但是它可能会使数据库处于不确定状态,如PostgreSQL documentation on
pg_resetxlog
中所述:

If pg_resetxlog complains that it cannot determine valid data for pg_control,you can force it to proceed anyway by specifying the -f (force) switch. In this case plausible values will be substituted for the missing data. Most of the fields can be expected to match,but manual assistance might be needed for the next OID,next transaction ID and epoch,next multitransaction ID and offset,and WAL starting address fields. These fields can be set using the switches discussed below. If you are not able to determine correct values for all these fields,-f can still be used,but the recovered database must be treated with even more suspicion than usual: an immediate dump and reload is imperative. Do not execute any data-modifying operations in the database before you dump,as any such action is likely to make the corruption worse.

原文链接:https://www.f2er.com/postgresql/193138.html

猜你在找的Postgre SQL相关文章