Re: Memory leak in WAL sender with pgoutput (v10~)
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-12-03T10:33:55Z
Lists: pgsql-hackers
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/
Commits
-
Fix memory leak in pgoutput with relation attribute map
- a786cf04df76 13.19 landed
- c53d90bb47ae 14.16 landed
- da8bd5d424e0 15.11 landed
- e3a27fd06d06 16.7 landed
- 836435424ba8 17.3 landed
- c9b3d4909bbf 18.0 landed
-
Fix memory leak in pgoutput with publication list cache
- ba230ce40faa 13.19 landed
- cfd6cbcf9be0 14.16 landed
- 6c9b3975407d 15.11 landed
- 4d45e7490c41 16.7 landed
- bbe68c13abe0 17.3 landed
- f0c569d71515 18.0 landed
-
Allow specifying row filters for logical replication of tables.
- 52e4f0cd472d 15.0 cited