pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pepe TD Vo <pepevo@yahoo.com>
To: Jan Peters <haseningo@gmx.de>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Subject: Re: PostgreSQL replication failover
Date: Wed, 13 Jan 2021 13:24:03 +0000 (UTC)
Message-ID: <526397214.877472.1610544243527@mail.yahoo.com> (raw)
In-Reply-To: <976875a5adf1c1cda0d55e6da0313f30dc8059f6.camel@cybertec.at>
References: <trinity-64a56362-8af1-4ec9-b408-d4256ce65fd2-1610526479876@3c-app-gmx-bs17>
	<976875a5adf1c1cda0d55e6da0313f30dc8059f6.camel@cybertec.at>

>>If you shut down the primary server cleanly, all changes will be replicated,so you should be good.

>>During a failover, that is, if the primary suddenly fails, there is always
the possibility that you lose some transactions, unless you use synchronous
you said above which I don't need to run promote to make it failover as long as I set synchronous on?   The last couple of weeks I have a failure on the primary server and can't run on a slave. It picks up as reading mode only.
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love, and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success

 

    On Wednesday, January 13, 2021, 06:25:53 AM EST, Laurenz Albe <laurenz.albe@cybertec.at> wrote:  
 
 On Wed, 2021-01-13 at 09:27 +0100, Jan Peters wrote:
> we are running postgresqlserver on s390 zLinux machines. The distribution
>  is RedHat 7 and RedHat 8, so we do not have the many x86 tools available.
> 
> We always run 2 instances with a replication (streaming) async mode, the replica
>  is in hot_standby and we use it for read-only accesses. About the setup we have the following question:
> 
> How is an orderly failover accomplished? Our current procedure is.
> 
> 1. primary stop
> 2. promote replica to primary
> 3. create standby.signal on old primary
> 4. change primary_conninfo on old primary
> 5. start old primary as new replica
> 
> Is this processing correct? Are there any other steps that simplify a failover?
>  How can we be sure that all changes have been transferred from the old master to the replica?

What you describe is not a failover, but a switchover.

If you shut down the primary server cleanly, all changes will be replicated,
so you should be good.

During a failover, that is, if the primary suddenly fails, there is always
the possibility that you lose some transactions, unless you use synchronous
replication.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



  

view thread (7+ messages)  latest in thread

Message-ID: <526397214.877472.1610544243527@mail.yahoo.com>
Permalink:  ../526397214.877472.1610544243527@mail.yahoo.com/
Also on:    postgresql.org/message-id/526397214.877472.1610544243527@mail.yahoo.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: pepevo@yahoo.com, haseningo@gmx.de, pgsql-admin@lists.postgresql.org, laurenz.albe@cybertec.at
  Subject: Re: PostgreSQL replication failover
  In-Reply-To: <526397214.877472.1610544243527@mail.yahoo.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