Re: WAL archive on slave - Mailing list pgsql-general

From James Sewell
Subject Re: WAL archive on slave
Date
Msg-id CANkGpBs4_Tr6rv6atVcjo9NB+8_QC3Up01NfCNvGbGV-ccy1FQ@mail.gmail.com
Whole thread Raw
In response to Re: WAL archive on slave  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List 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.albe@wien.gv.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

(+61) 3 8370 8000  W www.lisasoft.com  (+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.

pgsql-general by date:

Previous
From: Glyn Astill
Date:
Subject: Re: Better Connection Statistics
Next
From: peterlen
Date:
Subject: How to turn off DEBUG statements from psql commends