postgres standalone backend 单用户模式运行

来源:互联网 发布:cnc编程薪资 编辑:程序博客网 时间:2024/05/22 06:13

今天服务器数据库出现以下错误:

致命错误:  database is not accepting commands to avoid wraparound data loss in database "postgres"
提示:  Stop the postmaster and use a standalone backend to vacuum database "postgres".

查了相关资料:

http://www.kuqin.com/postgreSQL8.1_doc/app-postgres.html

找到了解决办法:

解决方式:

1,以postgres用户登录系统

    su postgres

2,进入单用户模式

postgres -D /var/lib/pgsql/data demo(数据库)

3,维护

vaccum full

 

如果有多个数据库,重复2,3步骤即可。

原创粉丝点击