Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby
Date: 2009-07-07 20:01:57
Message-ID: 543D6462-8BAB-4E84-900F-4EB6833A428E@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le 7 juil. 09 à 21:12, Tom Lane a écrit :
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> And I'm sure people will want the option to retain WAL longer in the
>> master, to avoid an expensive resync if the slave falls behind. It
>> would
>> be simple to provide a GUC option for "always retain X GB of old
>> WAL in
>> pg_xlog".
>
> Right, we would want to provide some more configurability on the
> when-to-recycle-WAL decision than there is now. But the basic point
> is that I don't see the master pg_xlog as being a long-term archive.
> The amount of back WAL that you'd want to keep there is measured in
> minutes or hours, not weeks or months.

Could we add yet another postmaster specialized child to handle the
archive, which would be like a default archive_command implemented in
core. This separate process could then be responsible for feeding the
slave(s) with the WAL history for any LSN not available in pg_xlog
anymore.

The bonus would be to have a good reliable WAL archiving default setup
for simple PITR and simple replication setups. One of the reasons PITR
looks so difficult is that it involves reading a lot of documentation
then hand-writing scripts even in the simple default case.

> (If nothing else, there is no point in keeping so much WAL that
> catching
> up by scanning it would take longer than taking a fresh base backup.
> My impression from recent complaints about our WAL-reading speed is
> that
> that might be a pretty tight threshold ...)

Could the design above make it so that your later PITR backup is
always an option for setting up a WAL Shipping slave?

Regards,
--
dim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-07-07 20:03:21 Re: *_collapse_limit, geqo_threshold
Previous Message Alvaro Herrera 2009-07-07 19:59:36 Re: Maintenance Policy?