]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix some memory leaks in the WAL receiver
authorMichael Paquier <michael@paquier.xyz>
Mon, 27 Apr 2026 01:32:45 +0000 (10:32 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 27 Apr 2026 01:32:45 +0000 (10:32 +0900)
commitb801d5eef17fde6d1311eaefa0f125c55731e30c
tree93ecc28e2ccee9f1d1b3076234ef2093a8c4212e
parentf9c638054c5b29d519bc8530f95da8a74b47af51
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
src/backend/replication/walreceiver.c