how to tell master from replica

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема how to tell master from replica
Дата
Msg-id E7B9EDC6-7233-438D-9F71-14CFFECCF9E5@elevated-dev.com
обсуждение исходный текст
Ответы Re: how to tell master from replica  (bricklen <bricklen@gmail.com>)
Re: how to tell master from replica  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
Assuming a master & replica set up using streaming replication, hot standby, 9.3.

I'd like to have a single script on both machines distinguish whether it's running on the machine with the master or
replica,and take different actions accordingly. 

Is the way to do this to check for the presence of wal sender process vs wal receiver process? Or is there a query that
couldexecuted against sys tables to find current running config of the local postmaster? 

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice






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

Предыдущее
От: Lonni J Friedman
Дата:
Сообщение: Re: postgres FDW doesn't support sequences?
Следующее
От: bricklen
Дата:
Сообщение: Re: how to tell master from replica