pgsql: Release postmaster working memory context in slotsync worker

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Release postmaster working memory context in slotsync worker
Date: 2026-04-06 14:05:37
Message-ID: E1w9ka8-003Eok-13@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Release postmaster working memory context in slotsync worker

Child processes do not need the postmaster's working memory context and
normally release it at the start of their main entry point. However,
the slotsync worker forgot to do so.

This commit makes the slotsync worker release the postmaster's working
memory context at startup, preventing unintended use.

Author: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Tiancheng Ge <getiancheng_2012(at)163(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHGQGwHO05JaUpgKF8FBDmPdBUJsK22axRRcgmAUc2Jyi8OK8g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/93dc1ace2007fe7c1103ccda3d7bc13b4eb4352f

Modified Files
--------------
src/backend/replication/logical/slotsync.c | 7 +++++++
1 file changed, 7 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Aleksander Alekseev 2026-04-06 14:39:04 Re: pgsql: Online enabling and disabling of data checksums
Previous Message Heikki Linnakangas 2026-04-06 13:04:15 pgsql: Fix compilation without injection points with some compilers