Re: Can a child process detect postmaster death when in pg_usleep?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Can a child process detect postmaster death when in pg_usleep?
Дата
Msg-id YOQ4eNSkjdbmlIck@paquier.xyz
обсуждение исходный текст
Ответ на Re: Can a child process detect postmaster death when in pg_usleep?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Can a child process detect postmaster death when in pg_usleep?
Список pgsql-hackers
On Tue, Jul 06, 2021 at 03:54:07PM +0530, Bharath Rupireddy wrote:
> Thanks. You are right. The issue is due to the MyLatch being set by
> SwitchToSharedLatch before WaitLatch. If we use (WL_TIMEOUT |
> WL_EXIT_ON_PM_DEATH), then the backends will honour the
> post_auth_delay as well as detect the postmaster death. Since we are
> not using WL_LATCH_SET, I removed ResetLatch. Also, added some
> comments around why we are not using WL_LATCH_SET.
>
> For PreAuthDelay, there's no problem to use WL_LATCH_SET as MyLatch
> still points to the local latch(which is not set) in
> BackendInitialize().

FWIW, I think that it could be a good idea to use the same set of
flags for all the pre/post_auth_delay paths for consistency.  That's
useful when grepping for one.  Please note that I don't plan to look
more at this patch set for this CF as I am not really excited by the
updates involving developer options, and I suspect more issues like
the one I found upthread so this needs a close lookup.

If somebody else wishes to look at it, please feel free, of course.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Commit fest manager
Следующее
От: Japin Li
Дата:
Сообщение: Re: Why is XLOG_FPI_FOR_HINT always need backups?