删除pg_xlog导致Pg无法启动

前几天由于做9.1PIRT,postgresql.conf中的
wal_keep_segments =1000          # in logfile segments, 16MB each; 0 disables

wal_keep_segments值设过大,导致我的linux系统硬盘容量满了。。。。
就把pg_xlog删去,发现机器启动不了了。

在群里问了一个大牛得到了解决办法

pg_resetxlog [-f] [-n] [-ooid ] [-x xid ] [-e xid_epoch ] [-m mxid ] [-O mxoff ] [-l timelineid,fileid,seg ] datadir





http://www.postgresql.org/docs/9.1/interactive/app-pgresetxlog.html

猜你喜欢

转载自i-am-birdman.iteye.com/blog/1329152