From: Tom Lane <tgl@sss.pgh.pa.us>
To: David F. Skoll <dfs@roaringpenguin.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Warm-standby robustness question
Date: Tue, 18 Dec 2007 13:55:57 -0500
Message-ID: <3149.1198004157@sss.pgh.pa.us> (raw)
In-Reply-To: <4768081F.90500@roaringpenguin.com>
References: <4768081F.90500@roaringpenguin.com>
"David F. Skoll" <dfs@roaringpenguin.com> writes:
> My question is this: If the master database is fairly busy, gets
> VACUUMed once a day, etc. can we expect the warm standby server
> to work correctly after days/weeks/months/years of log shipping,
> or should we periodically take new base backups?
I don't think the time period is at issue. Log-shipping should keep the
slave a perfect replica of the master (if it doesn't, we have problems
anyway). The operational question you need to ask yourself is: if
you haven't swapped to the slave lately, how do you know it will work
when you need it to?
The current backup/restore docs suggest as best practice that you
intentionally swap master and slave periodically, ie, fail over
to the slave and then re-initialize the master as a new slave.
This provides a periodic test that your fail-over mechanisms actually
work, and as a bonus gives you a chance for a maintenance window
on the ex-master before it's brought up as new slave.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, dfs@roaringpenguin.com
Subject: Re: Warm-standby robustness question
In-Reply-To: <3149.1198004157@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox