agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix some memory leaks in the WAL receiver
Date: Mon, 27 Apr 2026 01:33:17 +0000
Message-ID: <E1wHAqa-002zLz-32@gemulon.postgresql.org> (raw)

Fix some memory leaks in the WAL receiver

These are old leaks, that can pile up if a WAL receiver stays alive,
waiting for new WAL data after the sender has switched to a new
timeline.

While this is technically a bug, the impact is minimal and would only
become noticeable if the WAL sender handles a lot of timeline switches,
so no backpatch is done.  Note that in most cases, primary_conninfo
would be updated in a standby to point to a new sender, meaning a
restart of the WAL receiver.  Let's be clean on HEAD, though.

Author: DaeMyung Kang <charsyam@gmail.com>
Discussion: https://postgr.es/m/20260426170100.847923-1-charsyam@gmail.com
Discussion: https://postgr.es/m/20260426170219.849330-1-charsyam@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b801d5eef17fde6d1311eaefa0f125c55731e30c

Modified Files
--------------
src/backend/replication/walreceiver.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



Message-ID: <E1wHAqa-002zLz-32@gemulon.postgresql.org>
Permalink:  ../E1wHAqa-002zLz-32@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wHAqa-002zLz-32@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix some memory leaks in the WAL receiver
  In-Reply-To: <E1wHAqa-002zLz-32@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox