Re: Pg_ctl promote -- wait for slave to be promoted fully ?

From: Manoj Govindassamy <manoj(at)nimblestorage(dot)com>
To: Chris Angelico <rosuav(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Pg_ctl promote -- wait for slave to be promoted fully ?
Date: 2012-07-23 17:54:36
Message-ID: 500D8FDC.8090004@nimblestorage.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


awesome. thanks for the help. Will test it out.

thanks,
Manoj

On 07/20/2012 06:57 PM, Chris Angelico wrote:
> On Sat, Jul 21, 2012 at 5:28 AM, Manoj Govindassamy
> <manoj(at)nimblestorage(dot)com> wrote:
>> -- Anyway I can query the state of DB to know its status slave or master ??
>> So, that i can issue write statements only after I know that the DB is the
>> new master now
> Yep. Use pg_is_in_recovery() - it's false on the master, true on slaves.
>
> http://www.postgresql.org/docs/9.1/static/functions-admin.html#FUNCTIONS-RECOVERY-INFO-TABLE
>
> ChrisA
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adam Crews 2012-07-23 18:23:32 postgres 9 bind address for replication
Previous Message Rachel Owsley 2012-07-23 16:55:56 General guidance: Levenshtein distance versus other similarity algorithms

Browse pgsql-hackers by date

  From Date Subject
Next Message Adam Crews 2012-07-23 18:23:32 postgres 9 bind address for replication
Previous Message Robert Haas 2012-07-23 17:27:08 Re: [PATCH] XLogReader v2