On 8/16/16 1:05 PM, Tom Lane wrote: > Oh, interesting. It had occurred to me that we might be able to dodge > this issue if we started to recommend using unnamed POSIX semaphores > instead of SysV. (Obviously we'd want to check performance, but it's > at least a plausible alternative.) I had not wanted to go there if > it meant that we could have silent loss of SysV shmem with no other > symptoms, because as I said upthread, I'm concerned about that breaking > the multiple-postmaster interlock. However, if the cleanup kills only > semaphores and not attached-to shmem, then that objection goes away and > this becomes something we should seriously consider.
I was digging around this issue the other day again. We have switched to unnamed POSIX semaphores by default now, which will help. But for dynamic shared memory (DSM) we use POSIX shared memory by default, which is cleaned up without regarding to attachment. So there is still a potential for failures here, possibly more rare or obscure, given the usage of DSM. (If someone is keeping score, it appears the "safest" combination is SysV shared memory + POSIX semaphores.) I have started a wiki page to collect this information: https://wiki.postgresql.org/wiki/Systemd To be continued, I suppose ... -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers