summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRobert Haas2025-12-16 15:40:53 +0000
committerRobert Haas2025-12-16 17:24:55 +0000
commitf1a6e622bd94735c36d72c663813b55c442739b4 (patch)
tree838a51643197809a004b27ad3efb8a927141dde0 /configure.ac
parent462e2476525e71aa028c4a079bd77d2cac8a36b7 (diff)
Switch memory contexts in ReinitializeParallelDSM.HEADmaster
We already do this in CreateParallelContext, InitializeParallelDSM, and LaunchParallelWorkers. I suspect the reason why the matching logic was omitted from ReinitializeParallelDSM is that I failed to realize that any memory allocation was happening here -- but shm_mq_attach does allocate, which could result in a shm_mq_handle being allocated in a shorter-lived context than the ParallelContext which points to it. That could result in a crash if the shorter-lived context is freed before the parallel context is destroyed. As far as I am currently aware, there is no way to reach a crash using only code that is present in core PostgreSQL, but extensions could potentially trip over this. Fixing this in the back-branches appears low-risk, so back-patch to all supported versions. Author: Jakub Wartak <jakub.wartak@enterprisedb.com> Co-authored-by: Jeevan Chalke <jeevan.chalke@enterprisedb.com> Backpatch-through: 14 Discussion: http://postgr.es/m/CAKZiRmwfVripa3FGo06=5D1EddpsLu9JY2iJOTgbsxUQ339ogQ@mail.gmail.com
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions