现在的位置: 首页 > 综合 > 正文

gp_configuration_history

2013年08月20日 ⁄ 综合 ⁄ 共 1600字 ⁄ 字号 评论关闭

gp_configuration_history是关于gp_configuration的一个日志记录,当有节点不可用时,或者使用gprecovery修复节点时,这个时候需要修改gp_configuration,并把修改的日志写gp_configuration_history中, gpaddmirrors, gprecoverseg, 和gpinitsystem 这几个命令会中记录这个日志,当有节点坏了的时候,我们可以查询这个表看greenplum是什么时候发现的。有助于我们排除错误

  Table "pg_catalog.gp_configuration_history"
 Column |           Type               |  Modifiers 
   --------+--------------------------+-----------
    time   | timestamp with time zone | not null  时间
   dbid   | smallint                              | not null  是哪一个dbid(节点)
  desc   | text                                   |                 描述信息
Tablespace: "pg_global"

 

 

aligputf8=# select * from gp_configuration_history;
          time          | dbid |                                     desc                                    
------------------------+------+------------------------------------------------------------------------------
 2010-12-12 21:51:10+08 |    2 | FTSPROBE: content 0 fault mode "RO" marking as valid=f isprimary=f persist=f
 2010-12-12 21:51:10+08 |    5 | FTSPROBE: content 0 fault mode "RO" marking as valid=t isprimary=t persist=f
(2 rows)
比方说我们把其中一个primary节点给干掉了,在 gp_configuration_history中就会有两个记录,primary节点dbid=2标记为valid=false,并把mirror节点,dbid=5标记为主节点。

 

使用gprecoverseg -F后,表中又多了两条记录

             time              | dbid |                                           desc                                          
-------------------------------+------+------------------------------------------------------------------------------------------
 2010-12-12 21:54:10.472459+08 |    2 | GPRECOVERSEG: marking segment as invalid due to forced recovery while in read-only mode.
 2010-12-12 21:54:24.696657+08 |    2 | GPRECOVERSEG: set valid=t

 

 

 

 

抱歉!评论已关闭.