Search Postgresql Archives

Re: Detecting master/slave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux