pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWarm-standby robustness question
4+ messages / 4 participants
[nested] [flat]
* Warm-standby robustness question
@ 2007-12-18 17:49 David F. Skoll <dfs@roaringpenguin.com>
2007-12-18 18:55 ` Re: Warm-standby robustness question Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: David F. Skoll @ 2007-12-18 17:49 UTC (permalink / raw)
To: pgsql-admin
Hi,
We have two PostgreSQL 8.2 database servers: A master and a warm-standby
server. We plan on making an initial backup of the master onto the standby
and then use log-shipping with "real-time" WAL-file processing as described
in http://www.postgresql.org/docs/8.2/static/warm-standby.html
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?
How long would you go between base backups? Or is one initial copy
really sufficient with WAL-shipping-and-consuming working perfectly
thereafter?
Regards,
David.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Warm-standby robustness question
2007-12-18 17:49 Warm-standby robustness question David F. Skoll <dfs@roaringpenguin.com>
@ 2007-12-18 18:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-12-28 15:37 ` Re: Warm-standby robustness question Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2007-12-18 18:55 UTC (permalink / raw)
To: David F. Skoll <dfs@roaringpenguin.com>; +Cc: pgsql-admin
"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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Warm-standby robustness question
2007-12-18 17:49 Warm-standby robustness question David F. Skoll <dfs@roaringpenguin.com>
2007-12-18 18:55 ` Re: Warm-standby robustness question Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-12-28 15:37 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2007-12-28 16:11 ` Re: Warm-standby robustness question Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Grittner @ 2007-12-28 15:37 UTC (permalink / raw)
To: David F. Skoll <dfs@roaringpenguin.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
>>> On Tue, Dec 18, 2007 at 12:55 PM, in message <3149.1198004157@sss.pgh.pa.us>,
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "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).
Except for hint bits. This becomes more of a post-recovery
performance issue as the base backup ages, since they are included
in base backups, but not in WAL files.
http://archives.postgresql.org/pgsql-performance/2007-12/msg00203.php
> 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?
Absolutely. Nobody should ever assume they have a working backup
system without periodic tests that the backups can actually be used
to create a working system. Ever.
-Kevin
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Warm-standby robustness question
2007-12-18 17:49 Warm-standby robustness question David F. Skoll <dfs@roaringpenguin.com>
2007-12-18 18:55 ` Re: Warm-standby robustness question Tom Lane <tgl@sss.pgh.pa.us>
2007-12-28 15:37 ` Re: Warm-standby robustness question Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2007-12-28 16:11 ` Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 0 replies; 4+ messages in thread
From: Alvaro Herrera @ 2007-12-28 16:11 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: David F. Skoll <dfs@roaringpenguin.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin
Kevin Grittner wrote:
> >>> On Tue, Dec 18, 2007 at 12:55 PM, in message <3149.1198004157@sss.pgh.pa.us>,
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > "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).
>
> Except for hint bits. This becomes more of a post-recovery
> performance issue as the base backup ages, since they are included
> in base backups, but not in WAL files.
But hint bits should be replicated on the next full-page-write anyhow,
no?
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2007-12-28 16:11 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18 17:49 Warm-standby robustness question David F. Skoll <dfs@roaringpenguin.com>
2007-12-18 18:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-12-28 15:37 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2007-12-28 16:11 ` Alvaro Herrera <alvherre@commandprompt.com>
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