免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3605 | 回复: 2
打印 上一主题 下一主题

所有的wal文件都丢失了,其他数据都没有问题,怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-13 13:47 |只看该作者 |倒序浏览
遇到一个不幸的事情,所有的WAL文件都丢失了,包括pg_xlog下的WAL和备份的WAL文件
原因在于所有的WAL文件都是用的一块磁盘,现在它挂掉了,postgres启动不了.

其他的数据都没有问题.如何恢复?
怎么办!怎么办???

哪位兄弟给点线索.无限感激中!

论坛徽章:
0
2 [报告]
发表于 2007-04-13 14:17 |只看该作者
该问题已经找到解决方法:
pg_resetxlog -n /var/lib/postgresql/8.2/data

pg_control values:

pg_control version number:            822
Catalog version number:               200611241
Database system identifier:           5035139944963440411
Current log file ID:                  27
Next log file segment:                105
Latest checkpoint's TimeLineID:       1
Latest checkpoint's NextXID:          0/100438030
Latest checkpoint's NextOID:          949695
Latest checkpoint's NextMultiXactId:  1
Latest checkpoint's NextMultiOffset:  0
Maximum data alignment:               4
Database block size:                  8192
Blocks per segment of large relation: 131072
WAL block size:                       8192
Bytes per WAL segment:                16777216
Maximum length of identifiers:        64
Maximum columns in an index:          32
Date/time type storage:               floating-point numbers
Maximum length of locale name:        128
LC_COLLATE:                           C
LC_CTYPE:                             C


查找到了NextOID,然后:
pg_resetxlog -o 949695 /var/lib/postgresql/8.2/data

论坛徽章:
0
3 [报告]
发表于 2007-04-13 20:07 |只看该作者
很好。支持你来做版主
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP