Re: Excessive PostmasterIsAlive calls slow down WAL redo

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Excessive PostmasterIsAlive calls slow down WAL redo
Дата
Msg-id 18771.1522953567@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Excessive PostmasterIsAlive calls slow down WAL redo  (Andres Freund <andres@anarazel.de>)
Ответы Re: Excessive PostmasterIsAlive calls slow down WAL redo  (Andres Freund <andres@anarazel.de>)
Re: Excessive PostmasterIsAlive calls slow down WAL redo  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> ISTM the better approach would be to try to reduce the cost of
> PostmasterIsAlive() on common platforms - it should be nearly free if
> done right.

+1 if it's doable.

> One way to achieve that would e.g. to stop ignoring SIGPIPE and instead
> check for postmaster death inside the handler, without reacting to
> it. Then the the actual PostmasterIsAlive() checks are just a check of a
> single sig_atomic_t.

AFAIR, we do not get SIGPIPE on the postmaster pipe, because nobody
ever writes to it.  So this sketch seems off to me, even assuming that
not-ignoring SIGPIPE causes no problems elsewhere.

While it's not POSIX, at least some platforms are capable of delivering
a separate signal on parent process death.  Perhaps using that where
available would be enough of an answer.

            regards, tom lane


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Flexible configuration for full-text search
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: some last patches breaks plan cache