Safe switchover - Mailing list pgsql-general

From James Sewell
Subject Safe switchover
Date
Msg-id CAANVwEv6Ttv0p74P0U8DemFdYejC=VRX2xvFA-nPHTZk=v-12Q@mail.gmail.com
Whole thread Raw
Responses Re: Safe switchover
Re: Safe switchover
List pgsql-general
Hi all,

I’m trying to work out a procedure for a safe zero data loss switchover under (high) load, which allows the old master to be reconnected without the use of pgrewind.

Would the following be sane?

- open connection to database
- smart shutdown master
- terminate all other connections
- wait for shutdown (archiving will finish)
- Identify last archived WAL file name (ensure it’s on backup server.)
- wait till a standby has applied this WAL
- promote that standby 
- attach old master to new master

Cheers,
James Sewell 
--
James Sewell,
Chief Architect, Jirotech
Suite 46, Jones Bay Wharf, 26-32 Pirrama Road, Pyrmont NSW 2009


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: Tom Lane
Date:
Subject: Re: invalid non-zero objectSubId for object class
Next
From: Michel Pelletier
Date:
Subject: Re: invalid non-zero objectSubId for object class