Don't clobber postmaster sigmask in dsm_impl_resize.
authorThomas Munro <tmunro@postgresql.org>
Thu, 14 Jul 2022 13:23:29 +0000 (01:23 +1200)
committerThomas Munro <tmunro@postgresql.org>
Thu, 14 Jul 2022 14:00:09 +0000 (02:00 +1200)
commit80845b7c0b2cf0a26e44d7906d63cddbb4dd586c
tree9d571d87955fface85ab7cea51c72107c5e3ad04
parent7c0eb3c622eb0882f460805109f244679b340964
Don't clobber postmaster sigmask in dsm_impl_resize.

Commit 4518c798 intended to block signals in regular backends that
allocate DSM segments, but dsm_impl_resize() is also reached by
dsm_postmaster_startup().  It's not OK to clobber the postmaster's
signal mask, so only manipulate the signal mask when under the
postmaster.

Back-patch to all releases, like 4518c798.

Discussion: https://postgr.es/m/CA%2BhUKGKNpK%3D2OMeea_AZwpLg7Bm4%3DgYWk7eDjZ5F6YbozfOf8w%40mail.gmail.com
src/backend/storage/ipc/dsm_impl.c