Re: Release postmaster working memory context in slotsync worker

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Chao Li <li.evan.chao@gmail.com>
Cc: getiancheng <getiancheng_2012@163.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-06T14:09:49Z
Lists: pgsql-hackers
On Thu, Mar 19, 2026 at 5:16 PM Chao Li <li.evan.chao@gmail.com> wrote:
> Still, the current phrasing seems a bit too strong to me. Strictly speaking, the memory is already inherited at fork time, so this is not making access impossible in an absolute sense. What this patch really does is remove the inherited PostmasterContext, so the child no longer retains that postmaster-private data through that context.
>
> Maybe we could phrase in some way like: "so that it no longer retains access to postmaster-private data through PostmasterContext”.

Thanks for the review! I've pushed the patch.
Per your and Tiancheng's suggestions, I just used "prevent unintended use"
in the commit message.

Regards,

-- 
Fujii Masao



Commits

  1. Release postmaster working memory context in slotsync worker