PgSql 9.4 onwards

From: Vikas Sharma <shavikas(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: PgSql 9.4 onwards
Date: 2018-01-24 18:15:37
Message-ID: CAN6gwKxBMnieG__B7G9U5mFUE86CFhjS7KBY1Lbx4c6iMgNDtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

We are using PgSql 9.4 & 9.5 with repmgr 3.5.
Repmgr works properly and great in promoting a standby to Master when
automatic failover is enabled.

The issue we have is with the old master, if master was unavailable due to
network problem, though pgSql was up and running on it we end up with 2
masters.

Another scenario is with VMs we have databases on. Whenever VMs are
started, sometimes Standby VMs starts first and then again we end up with 2
masters.

Is there a way that the old master shoot/ stop itself when the standby is
promoted to master and as soon as the network is restored?

Is there a way to stop the pgSql starting up on standby if master is not
available yet?

For the 2nd question I have a feeling that I should create a shell script (
and call when pgSql starts) to check the state of pgSql on the server, e.g
if this a standby don't start it up if master not available, if this is
master and other replicated node is promoted to master then don't start it
up. I am not sure if I can cover all the permutations and combinations.

Let me know please if someone had done something like this.

Regards
Vikas

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2018-01-24 20:25:36 \g filename
Previous Message Melvin Davidson 2018-01-24 18:12:16 Re: PGSQL 10, many Random named DB