Postgres不接受命令和真空失败

时间:2017-09-15 23:34:27

标签: postgresql postgresql-8.4

首先,是的,它是Postgres的旧版本(8.4),但目前升级不是一种选择。

在包含许多表和行的大型生产数据库中,数据库因以下错误而停止运行:

dbname user 2017-09-13 13:30:01.570 UTC  ERROR:  database is not accepting commands to avoid wraparound data loss in database "dbname"
dbname user 2017-09-13 13:30:01.570 UTC  HINT:  Stop the postmaster and use a standalone backend to vacuum database "dbname".
        You might also need to commit or roll back old prepared transactions.

我们尝试对数据库进行真空吸尘(在单用户模式下),但这不是很成功(在失败前运行12小时):

backend> vacuum;
  2017-09-15 05:40:10.439 UTC  ERROR:  could not open relation with OID 1453898
  2017-09-15 05:40:10.439 UTC  STATEMENT:  vacuum;
backend>

重启后,数据库仍然没有接受命令。我们尝试了一个reindex,但由于原始问题而失败了。

我试图使用以下方式找到OID 1453898:

SELECT 1453898::regclass;

但没有结果返回。

还有什么方法可以清理并解决这个问题?

0 个答案:

没有答案