On Fri, Nov 2, 2012 at 9:06 AM, expertalert <expertalert(at)gmail(dot)com> wrote:
>
> From command line, is there any way to find out if the server is actually a
> slave server not master ??
>
> I am writing some script, so for sanity check purpose , i need to know if
> the server the server i am on , its actually slave
>
> thanks for your help.
select pg_is_in_recovery()
If it's true, you're on a slave; if false, master.
ChrisA