pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #18746: /src/backend/parser/parse_utilcmd.c
2+ messages / 2 participants
[nested] [flat]

* BUG #18746: /src/backend/parser/parse_utilcmd.c
@ 2024-12-09 13:08 PG Bug reporting form <noreply@postgresql.org>
  2024-12-09 14:33 ` Re: BUG #18746: /src/backend/parser/parse_utilcmd.c Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2024-12-09 13:08 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: dan-eli@mail.ru

The following bug has been logged on the website:

Bug reference:      18746
Logged by:          Daniel Elishakov
Email address:      dan-eli@mail.ru
PostgreSQL version: 16.4
Operating system:   ubuntu 20.04
Description:        

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #18746: /src/backend/parser/parse_utilcmd.c
  2024-12-09 13:08 BUG #18746: /src/backend/parser/parse_utilcmd.c PG Bug reporting form <noreply@postgresql.org>
@ 2024-12-09 14:33 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2024-12-09 14:33 UTC (permalink / raw)
  To: dan-eli@mail.ru; pgsql-bugs@lists.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)





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-12-09 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-09 13:08 BUG #18746: /src/backend/parser/parse_utilcmd.c PG Bug reporting form <noreply@postgresql.org>
2024-12-09 14:33 ` Alvaro Herrera <alvherre@alvh.no-ip.org>

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