Streaming replication and an archivelog

From: James Sewell <james(dot)sewell(at)lisasoft(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Streaming replication and an archivelog
Date: 2015-05-08 06:28:25
Message-ID: CANkGpBvdYH1yp4ihWcx3rHBgHohp_ve5G9ed73GS-0BKFZ7hUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello All,

I am running 9.4 on Centos.

I have three servers, one master and two slaves. The slaves have the
following recovery.conf

standby_mode = 'on'
primary_conninfo = 'user=postgres host=mastervip port=5432'
restore_command = 'scp -o BatchMode=yes postgres(at)backuphost:/archived_wals/%f
%p'
recovery_target_timeline= 'latest'

Is there any way to combine following

- a master switch (ie: if node1 dies and node2 is promoted then node3
follows node2)
- using a WAL archive, such that if node2 goes down for two days it will
get WALs from the archive if they are no longer on the master

At the moment the master switch works fine, but if I was to have a WAL
archive with multiple timelines in it then I would end up in the newest
timeline.

I suppose what I want is the following:

If I am a streaming replica only follow streamed timeline switches, not
archive timeline switches.

Obviously if I am not a streaming replica I need to follow archive timeline
switches so I don't break PIT recovery.

Possible?

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Sewell 2015-05-08 06:47:50 Re: Streaming replication and an archivelog
Previous Message Rajiv M Ranganath 2015-05-08 00:08:10 Re: Any freeware graphic display of DDL software available?