免费注册 查看新帖 |

Chinaunix

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

greenplum断电重启报错,其中二个结点未能启动起来.psql fatal invalid page header [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-04-13 17:47 |只看该作者 |倒序浏览
环境: SUSE Linux + Greenplum3.3.7(Base on PG8.3.2)
问题来源:机房连续二次断电.
症状:  gpstart报出大量的错,日志显示有几个结点不正常
分析过程:
使用gprecoverseg -F对结点进行修复.修复完成后,通过gpstate查看,发现仍然有二个结点启动不正常.以下,就进入结点里面,折腾PG了.

错误记录:
(1)
gpadmin@sdw1:~> PGOPTIONS='-c gp_session_role=utility' psql template1 -p 60001
psql: FATAL:  could not access status of transaction 3832760714
DETAIL:  Could not open file "pg_clog/0391": No such file or directory.

目前使用的方法(在群里面询问德哥使用的方法)
dd if=/dev/zero of=/data/m/gp4/pg_clog/xxxx bs=1 count=1048576
fix it.

         * In a crash-and-restart situation, it's possible for us to receive
         * commands to set the commit status of transactions whose bits are in
         * already-truncated segments of the commit log (see notes in
         * SlruPhysicalWritePage).      Hence, if we are InRecovery, allow the case
         * where the file doesn't exist, and return zeroes instead.

(2)
gpadmin@sdw1:/data/m/gp4> PGOPTIONS='-c gp_session_role=utility'  pg_ctl start -D /data/m/gp4/
gpadmin@sdw1:~> PGOPTIONS='-c gp_session_role=utility' psql jtsjzx -p 60001
psql: FATAL:  invalid page header in block 4 of relation "pg_attribute"
gpadmin@sdw1:~> PGOPTIONS='-c gp_session_role=utility' psql template1 -p 60001
psql: PANIC:  could not open critical system index 2662 (relcache.c:2490)

gpadmin@sdw1:/data/m/gp4> postgres -P -O -D /data/m/gp4 -p 60001
错误同上.

--这里面有个疑惑: P参数:disable system index  O参数:allow system table structure changes.为啥仍然会报could not open critical system index


走到这一步,似乎已经山穷水尽了,请教大牛们,可遇到这种情况,或者说有相应的文档可以参考的?谢谢.

论坛徽章:
0
2 [报告]
发表于 2012-04-14 20:06 |只看该作者
-O你这里应该用不到。
-P表示查询系统表时不使用索引,但是如果修改了系统表中的数据的话,还是会更新系统索引。
你这里的问题应该是读取pg_class表中的oid为2662(pg_class_oid_index)的记录时失败,估计是pg_class表本身的数据有损坏。

论坛徽章:
3
数据库技术版块每日发帖之星
日期:2015-06-18 22:20:00数据库技术版块每日发帖之星
日期:2015-06-21 22:20:00数据库技术版块每日发帖之星
日期:2015-08-27 06:20:00
3 [报告]
发表于 2012-04-17 14:03 |只看该作者
psql: FATAL:  could not access status of transaction 3832760714
DETAIL:  Could not open file "pg_clog/0391": No such file or directory.

我维护GP中也发生过"could not access status of transaction 3832760714",但不象你这样,连文件都没有了。看你的描述,象是你的数据数据丢失很多,估计即使数据库启来,估计还会有很多不正常的地方。

另手工启动底下结点时,不需要加 PGOPTIONS='-c gp_session_role=utility',直接:
pg_ctl start -D /data/m/gp4/
就可以了。不知你为何要加这个?只有用psql连接时才需要PGOPTIONS='-c gp_session_role=utility'。

论坛徽章:
0
4 [报告]
发表于 2012-04-17 22:30 |只看该作者
是的,不过好像是pg_attribute表有所损坏,但是进去之后,rebuild table pg_attribute仍然不行回复 2# nozjz


   

论坛徽章:
0
5 [报告]
发表于 2012-04-17 22:32 |只看该作者
嗯,是的,不用加前面那一部分的。今天使用PGOPTIONS='-c gp_session_role=utility' psql -d postgres -p 50001可以进库了,但是GP仍然启动不了。
osdba 发表于 2012-04-17 14:03
psql: FATAL:  could not access status of transaction 3832760714
DETAIL:  Could not open file "pg_cl ...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP