Re: Missing list_free in publicationcmds.c:OpenTableList

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Missing list_free in publicationcmds.c:OpenTableList
Date: 2026-07-29 04:35:39
Message-ID: 492899.1785299739@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

shihao zhong <zhong950419(at)gmail(dot)com> writes:
> On Tue, Jul 28, 2026 at 11:44 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>> On Tue, Jul 28, 2026 at 10:30 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>>> FWIW, I detected a missing `list_free`, which seems to have been
>>> accidentally left out from commit 923def9.

>> Okay since list_free for both relids and relids_with_rf are there, I
>> think list_free for 'relids_with_rf' also make sense. So LGTM.

AFAICS, that function is executed at most once per DDL command,
in a command-lifetime memory context. I think the right fix
is not to add another list_free but to remove the misleadingly
useless ones that are there.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2026-07-29 04:37:38 Re: More jsonpath methods: translate, split, join
Previous Message shihao zhong 2026-07-29 04:25:17 Re: Missing list_free in publicationcmds.c:OpenTableList