Re: WAL archive on slave

From: James Sewell <james(dot)sewell(at)lisasoft(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: WAL archive on slave
Date: 2014-02-10 13:29:01
Message-ID: CANkGpBs4_Tr6rv6atVcjo9NB+8_QC3Up01NfCNvGbGV-ccy1FQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I can understand it will create duplicates, but it would also allow for
recovery from backups.

If a backup was taken at midnight, and promotion happened at 6am then
having archiving on the slave would allow log replay from the backup.

Log replay from the old master would potentially end up in the incorrect
timeline.

Although potentially merging the archive logs favoring the new master's
logs might fix this?

Either way, it seems the answer to my question is no.

Thanks for the help!

-James Sewell

On Monday, 10 February 2014, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:

> James Sewell wrote:
> > If it is the the only way that I could achieve what I wanted would be to
> set
> > wal_keep_segments high enough then they will all be archived on
> promotion?
>
> Even if you set wal_keep_segments high I don't think that the replayed
> WAL will be archived.
>
> > I'm still not sure why they wouldn't be archived on the slave, seen as
> they show up in the directory?
> > Is there a limitation I'm not thinking about here?
>
> I guess that the idea is that a cluster will only archive the WAL it
> generates. Typically, the primary would archive these (if you don't
> archive
> WAL on the primary, you're probably doing something wrong).
> So this would only lead to duplicates.
>
> Yours,
> Laurenz Albe
>

--

James Sewell,
PostgreSQL Team Lead / Solutions Architect
______________________________________

Level 2, 50 Queen St, Melbourne VIC 3000

*P *(+61) 3 8370 8000 *W* www.lisasoft.com *F *(+61) 3 8370 8099

--

------------------------------
The contents of this email are confidential and may be subject to legal or
professional privilege and copyright. No representation is made that this
email is free of viruses or other defects. If you have received this
communication in error, you may not copy or distribute any part of it or
otherwise disclose its contents to anyone. Please advise the sender of your
incorrect receipt of this correspondence.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message peterlen 2014-02-10 15:43:33 How to turn off DEBUG statements from psql commends
Previous Message Glyn Astill 2014-02-10 11:40:56 Re: Better Connection Statistics