[pgcluster: 997] レプリケーションサーバのノンストップについて

小玉 芳信 y-kodama @ kk-mic.jp
2007年 7月 6日 (金) 20:00:31 JST


お世話になります。
こだまです。

構成は以下の通りです。

OS:Red Hat Linux 9
DB:pgcluster-1.5.0rc16

pc1:クラスタDB1、レプリケーションサーバ1
pc2:クラスタDB2、レプリケーションサーバ2
pc3:クラスタDB3、レプリケーションサーバ3

上記のような構成でノンストップ運用を構築したいと思っています。

動作は以下の通りです。

1.クラスタDB1、2、3、それぞれにDBアクセスして、DB更新できています。
2.レプリケーションサーバ1をダウンさせます。(レプリケーションサーバ2に切り替わっていると思われます)
3.レプリケーションサーバ1のダウン直後はDB更新が可能ですが、数秒経つと以下のエラーが発生してしまいます。
  
  ERROR:  This query is not permitted when all replication servers fell down

その後DB更新を行うことができません。

レプリケーションサーバのノンストップ運用の設定として、
どこか設定ファイルに間違いがあるのでしょうか。

何卒、ご指導よろしくお願いいたします。


設定ファイルは以下の通りです。
-----------------------------------------------
cluster.conf  (<Host_Name>はそれぞれのホスト名です)
-----------------------------------------------
<Replicate_Server_Info>
       <Host_Name> pc1</Host_Name>
       <Port> 8001 </Port>
       <Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>
<Replicate_Server_Info>
        <Host_Name> pc2 </Host_Name>
        <Port> 8001 </Port>
        <Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>
<Replicate_Server_Info>
        <Host_Name> pc3 </Host_Name>
        <Port> 8001 </Port>
        <Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>
<Host_Name>                             pc1        </Host_Name>
<Recovery_Port>                 7001                                    </Recovery_Port>
<Rsync_Path>                    /usr/bin/rsync                  </Rsync_Path>
<Rsync_Option>                  ssh -1                                  </Rsync_Option>
<Rsync_Compress>                yes                                             </Rsync_Compress>
<Pg_Dump_Path>                  /usr/local/pgsql/bin/pg_dump    </Pg_Dump_Path>
<When_Stand_Alone>              read_only                               </When_Stand_Alone>
<Replication_Timeout>   1min                                    </Replication_Timeout>
<LifeCheck_Timeout>             3s                                              </LifeCheck_Timeout>
<LifeCheck_Interval>    11s                                             </LifeCheck_Interval>


--------------------------------------------------
pgreplicate.conf  (<Host_Name>はそれぞれのホスト名です)
--------------------------------------------------
<Cluster_Server_Info>
    <Host_Name>   pc1  </Host_Name>
    <Port>        5432                </Port>
    <Recovery_Port>       7001        </Recovery_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
    <Host_Name>   pc2 </Host_Name>
    <Port>        5432                </Port>
    <Recovery_Port>       7001        </Recovery_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
    <Host_Name>   pc3   </Host_Name>
    <Port>        5432                </Port>
    <Recovery_Port>       7001       </Recovery_Port>
</Cluster_Server_Info>
<Host_Name> pc1    </Host_Name>
<Replication_Port>              8001            </Replication_Port>
<Recovery_Port>                 8101            </Recovery_Port>
<RLOG_Port>                             8301            </RLOG_Port>
<Response_Mode>                 reliable                </Response_Mode>
<Use_Replication_Log>   no                      </Use_Replication_Log>
<Replication_Timeout>   1min            </Replication_Timeout>
<LifeCheck_Timeout>             3s                      </LifeCheck_Timeout>
<LifeCheck_Interval>    15s                     </LifeCheck_Interval>
<Log_File_Info>
        <File_Name> /tmp/pgreplicate.log </File_Name>
        <File_Size> 1M </File_Size>
        <Rotate> 3 </Rotate>
</Log_File_Info>




pgcluster メーリングリストの案内