pgsql: pgoutput: Fix memory leak due to RelationSyncEntry.map. - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: pgoutput: Fix memory leak due to RelationSyncEntry.map.
Date
Msg-id E1lo0EZ-0004wK-Dl@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Add fallback implementation for setenv()
Next
From: Tom Lane
Date:
Subject: pgsql: Reject SELECT ... GROUP BY GROUPING SETS (()) FOR UPDATE.