public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alvaro Herrera <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: Memory leak in WAL sender with pgoutput (v10~)
Date: Tue, 3 Dec 2024 11:33:55 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2024-Dec-03, Michael Paquier wrote:
> So how about the attached that introduces a FreePublication() matching
> with GetPublication(), used to do the cleanup? Feel free to comment.
I think this doubles down on bad design in the logical replication code,
or at least it goes against what we do almost everywhere else in backend
code. We should do less freeing, more context deleting/resetting.
(Storing stuff in CacheMemoryContext was surely a mistake.)
If you don't like the idea of a static memcxt in the one block where
it's needed, I propose to store a new memcxt in PGOutputData, to be used
exclusively for publications, with a well defined lifetime. I'm against
reusing data->cachecxt, because the lifetime of that is 100% unclear.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
view thread (5+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Memory leak in WAL sender with pgoutput (v10~)
In-Reply-To: <[email protected]>
* 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