From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix memory leaks in scripts/vacuuming.c.
Date: Wed, 22 Oct 2025 19:19:27 +0000
Message-ID: <E1vBeMp-002zh6-0k@gemulon.postgresql.org> (raw)
Fix memory leaks in scripts/vacuuming.c.
Coverity complained that the list of table names returned by
retrieve_objects() was leaked, and it's right. Potentially this
is quite a lot of memory; however, it's not entirely clear how much
we gain by cleaning it up, since in many operating modes we're going
to need the list until the program is about to exit. Still, it will
win in some cases, so fix the leak.
vacuuming.c is new in v19, and this patch doesn't apply at all cleanly
to the predecessor code in v18. I'm not excited enough about the
issue to devise a back-patch.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bc310c6ff3463c65ce532a437f1d27a4318c8b4a
Modified Files
--------------
src/bin/scripts/vacuuming.c | 61 ++++++++++++++++++++++++++++++++++++---------
1 file changed, 49 insertions(+), 12 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 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 leaks in scripts/vacuuming.c.
In-Reply-To: <E1vBeMp-002zh6-0k@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