agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove unnecessary list_free() calls in OpenTableList().
Date: Wed, 12 Aug 2026 06:02:26 +0000
Message-ID: <E1wu22j-00000000Dbi-1hFp@gemulon.postgresql.org> (raw)
Remove unnecessary list_free() calls in OpenTableList().
OpenTableList() is invoked at most once per DDL statement, from
CreatePublication() and AlterPublicationTables(), and everything it
builds (relids, relids_with_rf, and relids_with_collist) is allocated
in the command's own memory context. That context is reclaimed as
soon as the command finishes, so explicitly freeing relids and
relids_with_rf here served no purpose.
Reported-by: Peter Smith <smithpb2250@gmail.com>
Suggested-by: Tom Lane <tgl@sss.pgh.pa.us>
Author: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: shihao zhong <zhong950419@gmail.com>
Reviewed-by: surya poondla <suryapoondla4@gmail.com>
Discussion: https://postgr.es/m/CAHut+Pt3bgyt==d6GCj=p9qu4sVSH_KQWLN7cMaH0RdJCO-K_Q@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cc1ea710dc88186aab4b3c129883d710781fcfb6
Modified Files
--------------
src/backend/commands/publicationcmds.c | 3 ---
1 file changed, 3 deletions(-)
Message-ID: <E1wu22j-00000000Dbi-1hFp@gemulon.postgresql.org>
Permalink: ../E1wu22j-00000000Dbi-1hFp@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wu22j-00000000Dbi-1hFp@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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove unnecessary list_free() calls in OpenTableList().
In-Reply-To: <E1wu22j-00000000Dbi-1hFp@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox