From: | Bosco Rama <postgres(at)boscorama(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | WAL shipping replication server re-sync |
Date: | 2011-03-19 22:26:22 |
Message-ID: | 4D852D8E.3020901@boscorama.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey folks,
We're using PG 8.4.7 on two servers that are geographically
distant from each other. We run WAL-shipping replication
(i.e. constant recovery mode replication) between the two
servers. These are the only two servers involved in the
setup. When we do the 'fail-over' to swap the master and
slave servers we perform the usual recovery trigger for
pg_standby and then wait. The slave now becomes the master
and the master becomes the new slave. This works great.
When the servers flip modes we have been following the
guidelines that say to clear the WAL logs and the main data
area of the slave and copy the data area of the new master
to the slave while the master is in 'backup' mode. Given
the current size (17GB) of this data area and the bandwidth
limits of the 'inter-tubes', this takes a rather long time.
(4.5 hrs last time)
Here's my (naive?) question: Since the two servers were
essentially 'in sync' immediately prior to the switch-
over is it possible to simply rsync the new master's data area
back to the new slave's data area without clearing the slave's
data area first? Or is the directory and file structure
sufficiently different (even if the logical data is identical)
to preclude this?
Could this difference be alleviated by using the various 'delete
on destination' options for rsync?
TIA,
Bosco.
From | Date | Subject | |
---|---|---|---|
Next Message | runner | 2011-03-20 00:00:42 | How do you stop the log from rotating on restart? |
Previous Message | Vibhor Kumar | 2011-03-19 22:02:26 | Re: How do I do this in plpgsql ? |