pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix various memory leaks in psql's describe commands \d*
Date: Thu, 21 Jul 2022 01:42:46 +0000
Message-ID: <E1oELDB-000VRI-S7@gemulon.postgresql.org> (raw)

Fix various memory leaks in psql's describe commands \d*

Most of these have been introduced in d2d3547 with the new pattern
validation logic, and would leak memory worth an amount of one
PQExpBuffer each time (as of 256 bytes at minimum, possibly more).

Most of the patch has been written by Tang Haiying, with a few tweaks
coming from Álvaro Herrera.

Reported-by: Tang Haiying
Author: Tang Haiying, Álvaro Herrera
Reviewed-by: Mark Dilger, Andres Freund, Álvaro Herrera, Tom Lane, Japin
Li, Michael Paquier, Junwang Zhao
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/171ab95f64493f30dccf34bb1cafaa7b4957cd4e

Modified Files
--------------
src/bin/psql/describe.c | 235 ++++++++++++++++++++++++++++++++++++++----------
1 file changed, 190 insertions(+), 45 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1oELDB-000VRI-S7@gemulon.postgresql.org>
Permalink:  ../E1oELDB-000VRI-S7@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oELDB-000VRI-S7@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 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: michael@paquier.xyz
  Subject: Re: pgsql: Fix various memory leaks in psql's describe commands \d*
  In-Reply-To: <E1oELDB-000VRI-S7@gemulon.postgresql.org>
  References: <E1oELDB-000VRI-S7@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