From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgoutput: Fix memory leak due to RelationSyncEntry.map.
Date: Tue, 01 Jun 2021 08:58:47 +0000
Message-ID: <E1lo0EZ-0004wK-Dl@gemulon.postgresql.org> (raw)
pgoutput: Fix memory leak due to RelationSyncEntry.map.
Release memory allocated when creating the tuple-conversion map and its
component TupleDescs when its owning sync entry is invalidated.
TupleDescs must also be freed when no map is deemed necessary, to begin
with.
Reported-by: Andres Freund
Author: Amit Langote
Reviewed-by: Takamichi Osumi, Amit Kapila
Backpatch-through: 13, where it was introduced
Discussion: https://postgr.es/m/MEYP282MB166933B1AB02B4FE56E82453B64D9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d2505681211b4803cae916e9f4c2331943f851dc
Modified Files
--------------
src/backend/replication/pgoutput/pgoutput.c | 49 ++++++++++++++++++++++++-----
src/test/subscription/t/013_partition.pl | 28 ++++++++++++++++-
2 files changed, 69 insertions(+), 8 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org
Subject: Re: pgsql: pgoutput: Fix memory leak due to RelationSyncEntry.map.
In-Reply-To: <E1lo0EZ-0004wK-Dl@gemulon.postgresql.org>
References: <E1lo0EZ-0004wK-Dl@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox