Re: Memory leak in pg_logical_slot_{get,peek}_changes

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: vignesh C <vignesh21@gmail.com>
Cc: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-07T23:49:48Z
Lists: pgsql-hackers
On Mon, Dec 30, 2024 at 10:31:20PM +0530, vignesh C wrote:
> The attached v3 version has the changes for the same. I have verified
> the patch in PG14 and PG13 by attaching to the debugger and calling
> "call MemoryContextStats(CacheMemoryContext)" to see there are no
> leaks.

Sorry for the delay here, I have come back into the business.

I have tuned a bit the comment block on top of the declaration of the
two contexts, fixed a comment in maybe_send_schema() that was now
inexact, and applied that down to v13 and v14.
--
Michael

Commits

  1. Fix memory leak in pgoutput with relation attribute map

  2. Fix memory leak in pgoutput with publication list cache