[Pgcluster-general] pgreplication failure

Sunitha S sunithas at aztecsoft.com
Thu May 22 14:13:19 UTC 2008


Hi All,



We were configuring the Postgres clustering in Linux (Red hat 5) with
following configuration



1.	Cluster DB 1 (hostname - tstmach4)
2.	Cluster DB 2(hostname - tstmach5)
3.	Replication server 1(hostname-tstmach1)



Load balancer is avoided and all are running on different machines



Following are steps followed for setup

1.	Postgres 8.3.1+pgcluster-1.9.0rc5-patch are installed in each of
the above machines as per the link
http://pgcluster.projects.postgresql.org/1_3/install.html
2.	Configured the cluster.conf under /usr/local/pgsql/data in
cluster DB1 and Cluster DB2 with respective cluster and replication
server details(sample is as shown below)
http://pgcluster.projects.postgresql.org/1_3/db_conf.html






<Replicate_Server_Info>

        <Host_Name>             tstmach1    </Host_Name>

        <Port>                  8001                            </Port>

        <Recovery_Port>         8102
</Recovery_Port>

</Replicate_Server_Info>



<Host_Name>                     tstmach 5            </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>

<Rsync_Timeout>                 10min
</Rsync_Timeout>

<Rsync_Bwlimit>                 0KB
</Rsync_Bwlimit>

<Pg_Dump_Path>                  /usr/local/pgsql/bin/pg_dump
</Pg_Dump_Path>

<Ping_Path>                             /bin/ping
</Ping_Path>

<When_Stand_Alone>              read_only
</When_Stand_Alone>

<Replication_Timeout>           1min
</Replication_Timeout>

<LifeCheck_Timeout>             3s
</LifeCheck_Timeout>

<LifeCheck_Interval>            11s
</LifeCheck_Interval>





3.	Configured the pgreplicate.conf with respective replication and
cluster details(sample is as shown below)


<Cluster_Server_Info>

    <Host_Name>                 tstmach4    </Host_Name>

    <Port>                      5432                            </Port>

    <Recovery_Port>             7001
</Recovery_Port>

</Cluster_Server_Info>

<Cluster_Server_Info>

    <Host_Name>                 tstmach5    </Host_Name>

    <Port>                      5432                            </Port>

    <Recovery_Port>             7001
</Recovery_Port>

</Cluster_Server_Info>

<Host_Name>                     tstmach1            </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>           1min
</Replication_Timeout>

<LifeCheck_Timeout>             3s
</LifeCheck_Timeout>

<LifeCheck_Interval>            15s
</LifeCheck_Interval>



Note: /usr/local/pgsql/etc folder was not created during installation.
Hence we created the same and proceed with setup
http://pgcluster.projects.postgresql.org/1_3/pgrp_conf.html



4.	The /etc/hosts, pg_hba.conf files were updated with IP and
hostname of all the components in the environment.
5.	Following command were executed at replication server

*	$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data



on running this 3 instances of Postgres are running



*	$ /usr/local/pgsql/bin/pgreplicate -D /usr/local/pgsql/etc



following error message is displayed once the above command is executed



pid file /usr/local/pgsql/etc/pgreplicate.pid found. is another
pgreplicate running?bash-3.1$



6.	Following command are executed at Cluster nodes

*	$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -o "-i"
start

and the databases start successfully

7.	On running the following at cluster DB 1



createdb testdb

the following error is displayed at the other Db

PGReplication failed

STATEMENT Set DateStyle=ISO



And when try to connect to Replication server from a client(Squirrel)
following warning message is displayed at replication server



WARNING:  This query is not permitted without running replication server



And the following at client

org.postgresql.util.PSQLException: An I/O error occured while sending to
the backend.



So please let us know how to resolve the issue and is non inclusion of
load balancer is cause for above.



Thanks in advance



Regards,

Sunitha S











This email message and its attachments may contain CONFIDENTIAL AND PRIVILEGED INFORMATION intended for the sole use of the addressee(s). If you have received it in error, please contact the sender by return email, notify your system manager and destroy the original message and any copies thereof. Any review, use, disclosure or distribution is unlawful. Please check this email and any attachments for the presence of viruses. The Company accepts no  liability for any damage caused by any virus transmitted by this email. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.
The Company reserves the right to monitor, review and store the content of all messages sent to or from this e-mail address.

www.aztecsoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgcluster-general/attachments/20080522/b0d08707/attachment-0001.html 


More information about the Pgcluster-general mailing list