Free indexed_tlist memory explicitly within set_plan_refs()

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>
Subject: Free indexed_tlist memory explicitly within set_plan_refs()
Date: 2015-05-25 01:17:38
Message-ID: CAM3SWZS+CauzbiCEcg-GdE6K6ycHE_Bz6Ksszy8AoixcMHOmsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While trying to fix a largely unrelated bug, I noticed that the new
build_tlist_index() call for the "excluded" targetlist (used by ON
CONFLICT DO UPDATE queries) does not have its memory subsequently
freed by the caller. Since every other call to build_tlist_index()
does this, and comments above build_tlist_index() encourage it, I
think the new caller should do the same.

Attached patch adds such a pfree() call.
--
Peter Geoghegan

Attachment Content-Type Size
add-pfree-indexed_tlist.patch text/x-patch 476 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-05-25 01:52:03 Re: Run pgindent now?
Previous Message Andres Freund 2015-05-25 01:17:07 Re: problems on Solaris