Re: clarification about standby promotion

From: Rakesh Kumar <rakeshkumar464(at)outlook(dot)com>
To: Jehan-Guillaume de Rorthais <ioguix(at)free(dot)fr>, Venkata B Nagothi <nag1010(at)gmail(dot)com>
Cc: Benoit Lobréau <benoit(dot)lobreau(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: clarification about standby promotion
Date: 2017-02-09 18:27:30
Message-ID: DM2PR05MB622189FA27475E942D2F6D48C450@DM2PR05MB622.namprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>Sure, but when you are doing a switchover, the standby is supposed to be
>connected to the master when you shutdown the master. So based on the doc,
>the standby should receive **everything** from the master before the master
>actually shutdown.

We use 9.5 and even in that version there is no handshake during role reversal.
In fact PG does not have concept of handshake and role reversal unlike in Db2, oracle
and sqlserver you can switchover from one to other by a single command.

Our DBAs use home grown script for switchover which does the following:

1 - first kill postmaster in the outgoing primary.
2 - promote the standby as the new primary
3 - use timeline to resync former primary (of step 1) with the new primary (step 2).
4- open up connection to the new standby (former primary)

I hope a more elegant way exists as in other RDBMS.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David O'Mahony 2017-02-09 20:46:44 How to troubleshoot "write on backend 0 failed"
Previous Message Jehan-Guillaume de Rorthais 2017-02-09 15:42:14 Re: clarification about standby promotion