Re: atexit_callback can be a net negative

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: atexit_callback can be a net negative
Дата
Msg-id 14497.1394203745@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: atexit_callback can be a net negative  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: atexit_callback can be a net negative  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-03-07 00:03:48 -0500, Tom Lane wrote:
>> In the bug thread I proposed making atexit_callback check whether getpid()
>> still matches MyProcPid.

> What are you proposing to do in that case? This is only one of the
> failure cases of forking carelessly, right?

No, I think it should do nothing.  The coding pattern shown in bug #9464
seems perfectly reasonable and I think we should allow it.  No doubt it's
safer if the child process does an on_exit_reset; but right now, if the
child fails to do so, atexit_callback is actively breaking things.  And
I don't think we can rely on third-party libraries to call on_exit_reset
after forking.
        regards, tom lane



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Row-security on updatable s.b. views
Следующее
От: Tom Lane
Дата:
Сообщение: Re: atexit_callback can be a net negative