On Oct 13, 2009, at 1:17 PM, David F. Skoll wrote:
Hi,
I'm running PostgreSQL 8.3. Suppose I have master server A shipping
logs
to backup server B. At some time in the past, I did a full backup
from A
to B, and now B is running in recovery mode, happily consuming WALs.
I'm running 8.4, but the following should be applicable.
Q1. If I stop and restart master server A gracefully, do I need to do
anything to B (assuming that it doesn't fail over... we'll assume I
did
something special to the standby script to tell B not to fail over
during planned downtime of A.) Can B continue happily consuming WALs,
or is another full backup required?
B can continue consuming WALs when A comes back up, provided it didn't
fail over and make itself into a master as you noted above. If you're
using the pg_standby script you can set it up so the slave will just
wait around checking for the next segment until the master comes back
up & use the trigger file to make failover happen (via an external
process).
Q2. If I stop and restart backup server B while master server A
continues
to run, will B continue eating WALs from where it left off? Or do
we need
another full backup? (We'll assume WAL shipping continues
successfully during
the time B is down: I'm only stopping/restarting PostgreSQL, not the
entire
machine.)
No need for another backup -- the slave will pick up and run through
the WALs that have accumulated as quickly as it can when it comes back
up. (This is how I do backups at the moment: One of my slaves shuts
down, our backup software grabs the data directory, then the slave
starts up again and chews through the logs that accumulated while it
was stopped).
The caveat is you need enough log segments available for recovery to
catch itself up, which shouldn't be a problem if your slave is only
stopped for a brief period.
-MG
--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin