| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Remove unnecessary list_free() calls in OpenTableList(). |
| Date: | 2026-08-12 06:02:26 |
| Message-ID: | E1wu22j-00000000Dbi-1hFp@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Suggested-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Author: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: shihao zhong <zhong950419(at)gmail(dot)com>
Reviewed-by: surya poondla <suryapoondla4(at)gmail(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-08-12 07:23:54 | pgsql: Fix poll_query_until() timeout handling with an undefined query |
| Previous Message | Fujii Masao | 2026-08-12 05:44:35 | pgsql: Avoid unnecessary matview populated-state updates |