Re: on_exit_reset fails to clear DSM-related exit actions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: on_exit_reset fails to clear DSM-related exit actions
Дата
Msg-id CA+TgmoYfmMChD_csLcVwJs_yeBL3sPcxZguGLO=7+Jtb_YNWqA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: on_exit_reset fails to clear DSM-related exit actions  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: on_exit_reset fails to clear DSM-related exit actions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Mar 7, 2014 at 2:40 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> The big picture here is that in the scenario being debated in the other
>> thread, exit() in a child process forked from a backend will execute that
>> backend's on_detach actions *even if the code had done on_exit_reset after
>> the fork*.
>
> Hmm.  So the problematic sequence of events is where a postmaster
> child forks, and then exits without exec-ing, perhaps because e.g.
> exec fails?

I've attempted a fix for this case.  The attached patch makes
test_shm_mq fork() a child process that calls on_exit_reset() and then
exits.  Without the fix I just pushed, this causes the tests to fail;
with this fix, this does not cause the tests to fail.

I'm not entirely sure that this is exactly right, but I think it's an
improvement.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: pg_upgrade on high number tables database issues
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Performance Improvement by reducing WAL for Update Operation