Shutting down server from a backend process, e.g. walrceiver

Поиск
Список
Период
Сортировка
От fazool mein
Тема Shutting down server from a backend process, e.g. walrceiver
Дата
Msg-id AANLkTi=NCSN0WfXwK0r-V7w82tBJY_OVdoW+1a0_yBOO@mail.gmail.com
обсуждение исходный текст
Ответы Re: Shutting down server from a backend process, e.g. walrceiver  (Fujii Masao <masao.fujii@gmail.com>)
Re: Shutting down server from a backend process, e.g. walrceiver  (David Fetter <david@fetter.org>)
Список pgsql-hackers
Hi,<br /><br />I want to shut down the server under certain conditions that can be checked inside a backend process.
Forinstance, while running symmetric replication, if the primary dies, I want the the walreceiver to detect that and
shutdownthe standby. The reason for shutdown is that I want to execute some other stuff before I start the standby as a
primary.Creating a trigger file doesn't help as it converts the standby into primary at run time.<br /><br />Using
proc_exit()inside walreceiver only terminates the walreceiver process, which postgres starts again. The other way I see
isusing ereport(PANIC, ...). Is there some other way to shutdown the main server from within a backend process?<br
/><br/>Thanks.<br /><br /><br /><br /> 

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Configuring synchronous replication
Следующее
От: Robert Haas
Дата:
Сообщение: Re: bg worker: general purpose requirements