pgsql: Reset the per-output-tuple exprcontext each time through the main

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reset the per-output-tuple exprcontext each time through the main
Date: 2010-08-18 21:52:24
Message-ID: 20100818215224.AD8877541D7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Reset the per-output-tuple exprcontext each time through the main loop in
ExecModifyTable(). This avoids memory leakage when trigger functions leave
junk behind in that context (as they more or less must). Problem and solution
identified by Dean Rasheed.

I'm a bit concerned about the longevity of this solution --- once a plan can
have multiple ModifyTable nodes, we are very possibly going to have to do
something different. But it should hold up for 9.0.

Modified Files:
--------------
pgsql/src/backend/executor:
nodeModifyTable.c (r1.8 -> r1.9)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeModifyTable.c?r1=1.8&r2=1.9)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-08-18 21:52:32 pgsql: Reset the per-output-tuple exprcontext each time through the main
Previous Message Tom Lane 2010-08-18 19:54:01 pgsql: Rename utf2ucs() to utf8_to_unicode(), and export it so it can be