BUG #17370: shmem lost on segfault

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17370: shmem lost on segfault
Дата
Msg-id 17370-a42a313cf1589256@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17370: shmem lost on segfault  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17370
Logged by:          RekGRpth
Email address:      rekgrpth@gmail.com
PostgreSQL version: 14.1
Operating system:   docker alpine
Description:

In developing my https://github.com/RekGRpth/pg_task I found strange
behavior of shared memory segment.
I setup shared memory segment and give it to background worker, which I
start with default restart interval.
See
https://github.com/RekGRpth/pg_task/blob/d951723b6e556479f9a3fa960a6b3d1fb8f52164/conf.c#L67-L134
And everything works fine, even if background worker exits on error (if for
example I drop needed table task), then it restarts and can access to shared
memory segment.
See
https://github.com/RekGRpth/pg_task/blob/d951723b6e556479f9a3fa960a6b3d1fb8f52164/work.c#L742
But if third other process terminates by segmentation fault, my background
worker restarts fine but can not access to shared memory segment.
dsm_attach returns NULL
What I need to do to solve this problem?


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17369: tmp files didn't deleted after oom killer killed process
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: BUG #17370: shmem lost on segfault