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

Поиск
Список
Период
Сортировка
От Manoj Govindassamy
Тема Re: Pg_ctl promote -- wait for slave to be promoted fully ?
Дата
Msg-id 500D8FDC.8090004@nimblestorage.com
обсуждение исходный текст
Ответ на Re: Pg_ctl promote -- wait for slave to be promoted fully ?  (Chris Angelico <rosuav@gmail.com>)
Список pgsql-general
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@nimblestorage.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
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Georges Racinet
Дата:
Сообщение: Problem with 9.1 streaming replication
Следующее
От: Chris Curvey
Дата:
Сообщение: meaning of "waiting" column in pg_stat_activity?