Re: How to find out if the server is postgres slave ??

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: How to find out if the server is postgres slave ??
Дата
Msg-id CAPTjJmq8uHr+4Bf5u-W6S-T7nt0OrUZ0kAUOtpUD-GQX2X6jow@mail.gmail.com
обсуждение исходный текст
Ответ на How to find out if the server is postgres slave ??  (expertalert <expertalert@gmail.com>)
Список pgsql-general
On Fri, Nov 2, 2012 at 9:06 AM, expertalert <expertalert@gmail.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


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

Предыдущее
От: dinesh kumar
Дата:
Сообщение: Re: How to find out if the server is postgres slave ??
Следующее
От: dinesh kumar
Дата:
Сообщение: Re: Postgresql - 8.3 Replication in windows