pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: James Sewell <james.sewell@jirotech.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Safe switchover
Date: Fri, 10 Jul 2020 09:45:27 +0200
Message-ID: <7E43945E-4571-4D30-9E8F-B940B9277DEF@gmail.com> (raw)
In-Reply-To: <CAANVwEu1AoiMe9ao0adaNjfW4TTT5ay7VoRUL6+9He18jg-ugQ@mail.gmail.com>
References: <CAANVwEv6Ttv0p74P0U8DemFdYejC=VRX2xvFA-nPHTZk=v-12Q@mail.gmail.com>
	<CAANVwEu1AoiMe9ao0adaNjfW4TTT5ay7VoRUL6+9He18jg-ugQ@mail.gmail.com>

Hi James,

I wouldn't work out the procedure myself, especially since there is a free working solution already. It's dangerous if you do it yourself and make a mistake.

In our company, we rely on Patroni (https://github.com/zalando/patroni). Yes, it uses pg_rewind in the background but it does switchover and failover fast and reliably (also for high load databases), handles timelines automatically and so on.

For the DCS, we use etcd, but you can choose yourself, which one you want.

Cheers,
Paul


> On 10. Jul, 2020, at 09:18, James Sewell <james.sewell@jirotech.com> wrote:
> 
> 
> - open connection to database
> - smart shutdown master
> - terminate all other connections
> - wait for shutdown (archiving will finish)
> 
> OK despite what it looked like from the code - upon testing it seems like even a fast shutdown will wait for logs to be archived *as long as progress is being made* (the same as smart).
> 
> 
> 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.






view thread (13+ messages)  latest in thread

Message-ID: <7E43945E-4571-4D30-9E8F-B940B9277DEF@gmail.com>
Permalink:  ../7E43945E-4571-4D30-9E8F-B940B9277DEF@gmail.com/
Also on:    postgresql.org/message-id/7E43945E-4571-4D30-9E8F-B940B9277DEF@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: paul.foerster@gmail.com, james.sewell@jirotech.com
  Subject: Re: Safe switchover
  In-Reply-To: <7E43945E-4571-4D30-9E8F-B940B9277DEF@gmail.com>
  References: <CAANVwEv6Ttv0p74P0U8DemFdYejC=VRX2xvFA-nPHTZk=v-12Q@mail.gmail.com> <CAANVwEu1AoiMe9ao0adaNjfW4TTT5ay7VoRUL6+9He18jg-ugQ@mail.gmail.com> <7E43945E-4571-4D30-9E8F-B940B9277DEF@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox