[Pgcluster-general] problems with rsync on pgcluster
Daniel Matte Freitas
danielmatte at gmail.com
Wed Mar 5 14:36:58 UTC 2008
Hi,
Have the following structure:
LB = m1 - http://www.danielmatte.com/pgconf/pglb-m1.conf
DB1 = m2 - http://www.danielmatte.com/pgconf/cluster-m2.conf
DB2 = m3 - http://www.danielmatte.com/pgconf/cluster-m3.conf
DB3 = m4 - http://www.danielmatte.com/pgconf/cluster-m4.conf
REP = m5 - http://www.danielmatte.com/pgconf/pgreplicate-m5.conf
in using pgcluster-1.7.0rc9.
I start the replicator(m5), LB(m1) and DB1(m2) - respectively, without
problems.
After i start DB2(m3) and DB3(m4) with option -U:
postgres at m3:~$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ start
-o "-U"
Both synchronize normally and cluster is working!
However, I would like to use rsync. Then end the entire cluster and try init
again as follows:
Start the replicator(m5), LB(m1) and DB1(m2) - respectively, without
problems.
Connect on LB(m1) with pgadmin or psql and make some changes, all performed
only on DB1(m2) which is the only initialized.
After i start DB2(m3) with option -R for use rsync:
postgres at m3:~$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ start
-o "-R"
server starting
postgres at m3:~$ Start in recovery mode!
Please wait until a data synchronization finishes from Master DB...
1st recovery step of [global] directory...OK
1st recovery step of [base] directory...OK
1st recovery step of [pg_clog] directory...OK
1st recovery step of [pg_xlog] directory...OK
1st sync_table_space OK
2nd recovery step of [global] directory...OK
2nd recovery step of [base] directory...OK
2nd recovery step of [pg_clog] directory...OK
2nd recovery step of [pg_xlog] directory...OK
2nd sync_table_space OK
2nd recovery successed
LOG: could not create IPv6 socket: Address family not supported by protocol
LOG: database system was interrupted at 2008-03-05 09:22:40 AMT
LOG: checkpoint record is at 0/509480
LOG: redo record is at 0/509480; undo record is at 0/0; shutdown FALSE
LOG: next transaction ID: 0/2620; next OID: 32769
LOG: next MultiXactId: 1; next MultiXactOffset: 0
LOG: database system was not properly shut down; automatic recovery in
progress
Start in recovery mode!
Please wait until a data synchronization finishes from Master DB...
LOG: redo starts at 0/5094D0
LOG: record with zero length at 0/518E50
LOG: redo done at 0/518E20
LOG: database system is ready
The machine is working!
Then i try init the DB3(m4) with option -R and o receive the following
error:
postgres at m4:~$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ start
-o "-R"
server starting
postgres at m4:~$ Start in recovery mode!
Please wait until a data synchronization finishes from Master DB...
PGR_Recovery_Main() failed with cold recovery
postgres at m4:~$
The rsyng is configured properly, because i try to do the test and
synchronization is performed successfully in DB1 (m2) and DB2 (m3):
postgres at m4:~/tmp/data$ rsync -auzrv -e "ssh -1" m2:/usr/local/pgsql/data
/home/postgres/tmp/
receiving file list ... done
data/
data/base/1/
data/base/10819/
data/base/24577/
data/global/
data/pg_multixact/
data/pg_multixact/members/
data/pg_multixact/offsets/
data/pg_subtrans/
data/pg_tblspc/
data/pg_twophase/
sent 86 bytes received 5078 bytes 2065.60 bytes/sec
total size is 33057066 speedup is 6401.45
postgres at m4:~/tmp/data$ rsync -auzrv -e "ssh -1" m3:/usr/local/pgsql/data
/home/postgres/tmp/
receiving file list ... done
data/
data/base/1/
data/base/10819/
data/base/24577/
data/global/
data/pg_multixact/
data/pg_multixact/members/
data/pg_multixact/offsets/
data/pg_subtrans/
data/pg_tblspc/
data/pg_twophase/
sent 86 bytes received 5173 bytes 1502.57 bytes/sec
total size is 32855375 speedup is 6247.46
postgres at m4:~/tmp/data$
When i try init with option -U i receive the following message:
postgres at m4:/usr/local/pgsql/data$ /usr/local/pgsql/bin/pg_ctl -D
/usr/local/pgsql/data/ start -o "-U"
server starting
postgres at m4:/usr/local/pgsql/data$ LOG: could not create IPv6 socket:
Address family not supported by protocol
LOG: database system was shut down at 2008-03-05 06:42:50 AMT
LOG: checkpoint record is at 0/4978C8
LOG: redo record is at 0/4978C8; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 0/959; next OID: 16387
LOG: next MultiXactId: 1; next MultiXactOffset: 0
Start in recovery mode!
Please wait until a data synchronization finishes from Master DB...
LOG: database system is ready
But when i try connect to this node it displays the following message:
ERROR: This query is not permitted when all replication servers fell down
STATEMENT: SET DateStyle=ISO
As if the node in the cluster were alone, not seeing the replicador.
I don't know how to proceed. Anyone have any suggestions?
Thanks,
Daniel Matte Freitas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgcluster-general/attachments/20080305/e4fa1c29/attachment.html
More information about the Pgcluster-general
mailing list