pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Switchover
Date: Thu, 28 Dec 2023 07:25:20 -0700
Message-ID: <D1AA6686-E36E-40AD-9CAD-91FF59814349@elevated-dev.com> (raw)
In-Reply-To: <CAJk5AtZao0MEHVj-3yKwK-JJNoBd8YsU9qG0Kix-o0+EBRPq1A@mail.gmail.com>
References: <CAJk5AtanGhcNyMuSmr3hQ5b-mDDyqido-=vcD5MKeFPew2g+Cw@mail.gmail.com>
	<CAJk5AtZao0MEHVj-3yKwK-JJNoBd8YsU9qG0Kix-o0+EBRPq1A@mail.gmail.com>

In my experience:

- Patroni switchover happens in a few seconds
- If you use pgbouncer, the client connections don't get dropped. A client that issues a query in that brief window will get an error.
- If your clients have retry logic, your users will never notice the failover.

--
Scott Ribe
scott_ribe@elevated-dev.com
https://www.linkedin.com/in/scottribe/



> On Dec 27, 2023, at 10:38 PM, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
> 
> Do I have to take a downtime of few mns and stop the applications and do a switchover?
> 
> What happens internally when we use the command patronictl switchover? Just that the role is changed? Will it affect incoming connections?
> 
> On Sat, 23 Dec 2023, 23:38 Rajesh Kumar, <rajeshkumar.dba09@gmail.com> wrote:
> Hi all,
> 
> 
> Any idea what prerequisite I should follow before I use the command patronictl switchover?






view thread (7+ messages)  latest in thread

Message-ID: <D1AA6686-E36E-40AD-9CAD-91FF59814349@elevated-dev.com>
Permalink:  ../D1AA6686-E36E-40AD-9CAD-91FF59814349@elevated-dev.com/
Also on:    postgresql.org/message-id/D1AA6686-E36E-40AD-9CAD-91FF59814349@elevated-dev.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott_ribe@elevated-dev.com, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Switchover
  In-Reply-To: <D1AA6686-E36E-40AD-9CAD-91FF59814349@elevated-dev.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