Re: Missing list_free in publicationcmds.c:OpenTableList
Re: Missing list_free in publicationcmds.c:OpenTableList
Hi Peter,
+1 for v2, I confirmed the premise: OpenTableList() is only reached from CreatePublication() and AlterPublicationTables(), i.e. once
per DDL statement, with the lists allocated in the command's context.
Can you add a comment before the return something like
/*
* relids, relids_with_rf and relids_with_collist are deliberately not
* freed here. This function runs at most once per DDL command, the
* surrounding command-lifetime memory context frees them later.
*/
So future readers will not think of it as a bug.
This is only a suggestion, feel free to skip it if you'd rather keep the patch minimal.
Regards,
Surya Poondla
+1 for v2, I confirmed the premise: OpenTableList() is only reached from CreatePublication() and AlterPublicationTables(), i.e. once
per DDL statement, with the lists allocated in the command's context.
Can you add a comment before the return something like
/*
* relids, relids_with_rf and relids_with_collist are deliberately not
* freed here. This function runs at most once per DDL command, the
* surrounding command-lifetime memory context frees them later.
*/
So future readers will not think of it as a bug.
This is only a suggestion, feel free to skip it if you'd rather keep the patch minimal.
Regards,
Surya Poondla
Re: Missing list_free in publicationcmds.c:OpenTableList
От:
Peter Smith <smithpb2250@gmail.com>
Дата:
On Wed, Aug 12, 2026 at 9:57 PM Amit Kapila wrote: > > On Tue, Aug 11, 2026 at 6:06 PM Daniel Gustafsson wrote: > > > > > On 11 Aug 2026, at 04:27, Amit Kapila wrote: > > > > > > On Tue, Aug 11, 2026 at 4:51 AM Peter Smith wrote: > > >> > > >> Fair enough. TBH I'm not sure if comments like this are usual > > >> practice, > > > > > > Yes, I have a similar understanding so let's not set a precedent that > > > could invite similar comments sprinkled everywhere a list_free/pfree > > > is not called, which is noise rather than signal. > > > > A very big +1 on that. > > > > Pushed. > Thanks for pushing. ====== Kind Regards, Peter Smith. Fujitsu Australia