From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: dan-eli@mail.ru
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18746: /src/backend/parser/parse_utilcmd.c
Date: Mon, 9 Dec 2024 15:33:28 +0100
Message-ID: <202412091433.cg4ae6bd7fjr@alvherre.pgsql> (raw)
In-Reply-To: <18746-2b3bdd60a982a674@postgresql.org>
On 2024-Dec-09, PG Bug reporting form wrote:
> Dynamic memory, referenced by 'colname', is allocated at ruleutils.c:3587 by
> calling function 'deparse_expression' at parse_utilcmd.c:4061 and lost at
> parse_utilcmd.c:4100.
I think this refers to transformPartitionBound() which calls
deparse_expression(). I don't think a memory leak here is very
interesting, because this is DDL code which should be called in a
short-lived memory context, so it's freed soon afterwards. (I bet you
could find thousands of cases of similar situations elsewhere in the DDL
code.)
Indeed, transformPartitionBound is only called by DefineRelation (used
to create a table or similar) or transformPartitionCmd, which is called
for ALTER TABLE ... ATTACH/DETACH PARTITION.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"The problem with the future is that it keeps turning into the present"
(Hobbes)
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-bugs@postgresql.org
Cc: alvherre@alvh.no-ip.org, dan-eli@mail.ru, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18746: /src/backend/parser/parse_utilcmd.c
In-Reply-To: <202412091433.cg4ae6bd7fjr@alvherre.pgsql>
* 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