pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix memory leak in pg_restore with zstd-compressed data.
Date: Wed, 18 Dec 2024 03:31:53 +0000
Message-ID: <E1tNkmu-0008I8-Rt@gemulon.postgresql.org> (raw)

Fix memory leak in pg_restore with zstd-compressed data.

EndCompressorZstd() neglected to free everything.  This was
most visible with a lot of large objects in the dump.

Per report from Tomasz Szypowski.  Back-patch to v16
where this code came in.

Discussion: https://postgr.es/m/DU0PR04MB94193D038A128EF989F922D199042@DU0PR04MB9419.eurprd04.prod.outlook.com

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/04b86019818067b32ce51883a3322f875d573d15

Modified Files
--------------
src/bin/pg_dump/compress_zstd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1tNkmu-0008I8-Rt@gemulon.postgresql.org>
Permalink:  ../E1tNkmu-0008I8-Rt@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tNkmu-0008I8-Rt@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix memory leak in pg_restore with zstd-compressed data.
  In-Reply-To: <E1tNkmu-0008I8-Rt@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