Re: Detecting master/slave - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: Detecting master/slave
Date
Msg-id m4nhmf$e5t$1@ger.gmane.org
Whole thread Raw
In response to Detecting master/slave  (Steve Pribyl <Steve.Pribyl@akunacapital.com>)
List pgsql-general
Steve Pribyl schrieb am 21.11.2014 um 15:13:
> Is there a better/recommended way to determine which host in a
> cluster is the master or slave besides rescue.conf or
> pg_stat_replication?
>
> Just looking for the "right" way to know which
> host is which.

What about

  select pg_is_in_recovery()

should return true on the slave and false on the master.


pgsql-general by date:

Previous
From: Nitesh Gupta
Date:
Subject: Re: Detecting master/slave
Next
From: Sameer Kumar
Date:
Subject: Re: Detecting master/slave