Re: How to find the primary server of a hot standby server?

Поиск
Список
Период
Сортировка
От Shoaib Mir
Тема Re: How to find the primary server of a hot standby server?
Дата
Msg-id AANLkTi=xxbhFHn6QxD52kv43_8HfEms_0Of3MvgQcTmn@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to find the primary server of a hot standby server?  (Guillaume Lelarge <guillaume@lelarge.info>)
Ответы Re: How to find the primary server of a hot standby server?  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-admin
On Fri, Oct 15, 2010 at 9:39 AM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
Le 14/10/2010 23:18, Rudolf van der Leeden a écrit :
> [...]
> quick question to the PG 9 community.
>
> I can query a hot standby server if recovery is still active using
> the administration function pg_is_in_recovery(). Is there also a way
> to query for the 'primary server', i.e. which server is delivering
> the WAL records?
>
> I'd like to monitor a bunch of standby servers in terms of
> configuration and operation.
>

There's no "SQL" way to know this, AFAICT. But I would love to be proven
wrong: I would be able to add this info to pgAdmin, which would be great.



What about doing a query like:

show wal_level; 

If it shows hot_standby then that server should have been setup as master. As an extra step you can also check for archive_mode as well if its enabled or not.
 
--
Shoaib Mir
http://shoaibmir.wordpress.com/

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: How to find the primary server of a hot standby server?
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: How to find the primary server of a hot standby server?