[Pgcluster-general] Problems with multiple replication servers in two node setup version 1.5.0rc16

johng at auctionsolutions.com johng at auctionsolutions.com
Sat Jun 2 20:28:14 UTC 2007


Hi,

I am running version 1.5.0rc16 with multiple replication servers running on
two different servers.

I have read there is a problem with failover and pgreplicate.  Has this
been fixed?

rep1 and cluster1 are on same server using eth0:1 for rep1

rep2 and cluster2 are on same server using eth0:1 for rep2

The symptom is that if a kill pgreplicate on rep1 and try to insert into a
table I get error message:

"ERROR:  This query is not permitted when all replication servers fell
down"

However, pgrepliate is still running on rep2.

Thanks for the help.

My config files are as follows:


/etc/hosts

10.1.2.100      host
10.1.2.101      sys1
10.1.2.102      sys2
10.1.2.101      db1     cluster1
10.1.2.102      db2     cluster2
10.1.2.103      rep1
10.1.2.104      rep2

===========================================================

cluster1: cluster.conf

<Replicate_Server_Info>
        <Host_Name> rep1 </Host_Name>
        <Port> 8001 </Port>
        <Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>
<Replicate_Server_Info>
        <Host_Name> rep2 </Host_Name>
        <Port> 8001 </Port>
        <Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>

<Host_Name>          cluster1                </Host_Name>
<Recovery_Port>         7001              </Recovery_Port>
<Rsync_Path>         /usr/bin/rsync       </Rsync_Path>
<Rsync_Option>       ssh -2               </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>

============================================================
rep1: pgreplicate.conf

<Cluster_Server_Info>
    <Host_Name> cluster1 </Host_Name>
    <Port> 5432 </Port>
    <Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
    <Host_Name> cluster2 </Host_Name>
    <Port> 5432 </Port>
    <Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>

<Host_Name>             rep1            </Host_Name>
<Replication_Port>      8001            </Replication_Port>
<Recovery_Port>         8101            </Recovery_Port>
<RLOG_Port>             8301            </RLOG_Port>
#<Response_Mode>         normal          </Response_Mode>
<Use_Replication_Log>   no             </Use_Replication_Log>
<Replication_Timeout>   10s            </Replication_Timeout>
<LifeCheck_Timeout>     5s              </LifeCheck_Timeout>
<LifeCheck_Interval>    30s             </LifeCheck_Interval>
#-------------------------------------------------------------
# A setup of a log files
#-------------------------------------------------------------
<Log_File_Info>
        <File_Name> /usr/local/pgsql/data/logs/pgreplicate.log </File_Name>
        <File_Size> 1M </File_Size>
        <Rotate> 3 </Rotate>
</Log_File_Info>

===============================================================
cluster2: cluster.conf

<Replicate_Server_Info>
        <Host_Name> rep1 </Host_Name>
        <Port> 8001 </Port>
        <Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>
<Replicate_Server_Info>
        <Host_Name> rep2 </Host_Name>
        <Port> 8002 </Port>
        <Recovery_Port> 8102 </Recovery_Port>
</Replicate_Server_Info>

<Host_Name>          cluster2                </Host_Name>
<Recovery_Port>         7001              </Recovery_Port>
<Rsync_Path>         /usr/bin/rsync       </Rsync_Path>
<Rsync_Option>       ssh -2               </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>

=====================================================================

rep2: pgreplicate.conf

<Cluster_Server_Info>
    <Host_Name> cluster1 </Host_Name>
    <Port> 5432 </Port>
    <Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
    <Host_Name> cluster2 </Host_Name>
    <Port> 5432 </Port>
    <Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>

#------------------------------------------------------------
# A definition of THE PRIMARY (ie - not me) replication server
#-------------------------------------------------------------
<Replicate_Server_Info>
   <Host_Name> rep1 </Host_Name>
   <Port> 8001 </Port>
   <RLOG_Port> 8301 </RLOG_Port>
   <Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>

#------------------------------------------------------------
# A setup of a replication server
#-------------------------------------------------------------
<Host_Name>             rep2            </Host_Name>
<Replication_Port>      8001            </Replication_Port>
<Recovery_Port>         8101            </Recovery_Port>
<RLOG_Port>             8301            </RLOG_Port>
#<Response_Mode>         normal          </Response_Mode>
<Use_Replication_Log>   no             </Use_Replication_Log>
<Replication_Timeout>   10s            </Replication_Timeout>
<LifeCheck_Timeout>     5s              </LifeCheck_Timeout>
<LifeCheck_Interval>    30s             </LifeCheck_Interval>
#-------------------------------------------------------------
# A setup of a log files
#-------------------------------------------------------------
<Log_File_Info>
        <File_Name> /usr/local/pgsql/data/logs/pgreplicate.log </File_Name>
        <File_Size> 1M </File_Size>
        <Rotate> 3 </Rotate>
</Log_File_Info>











-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgcluster-general/attachments/20070602/5563c64b/attachment.html 


More information about the Pgcluster-general mailing list