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?