postgres/src
Tom Lane 683706b136 Fix error cleanup failure caused by 8.4 changes in plpgsql to try to avoid
memory leakage in error recovery.  We were calling FreeExprContext, and
therefore invoking ExprContextCallback callbacks, in both normal and error
exits from subtransactions.  However this isn't very safe, as shown in
recent trouble report from Frank van Vugt, in which releasing a tupledesc
refcount failed.  It's also unnecessary, since the resources that callbacks
might wish to release should be cleaned up by other error recovery mechanisms
(ie the resource owners).  We only really want FreeExprContext to release
memory attached to the exprcontext in the error-exit case.  So, add a bool
parameter to FreeExprContext to tell it not to call the callbacks.

A more general solution would be to pass the isCommit bool parameter on to
the callbacks, so they could do only safe things during error exit.  But
that would make the patch significantly more invasive and possibly break
third-party code that registers ExprContextCallback callbacks.  We might want
to do that later in HEAD, but for now I'll just do what seems reasonable to
back-patch.
2009-07-18 19:15:50 +00:00
..
backend Fix error cleanup failure caused by 8.4 changes in plpgsql to try to avoid 2009-07-18 19:15:50 +00:00
bin Fix up pg_dump's --binary-upgrade option so that it behaves properly with 2009-07-02 21:34:38 +00:00
include Fix error cleanup failure caused by 8.4 changes in plpgsql to try to avoid 2009-07-18 19:15:50 +00:00
interfaces Translation updates for 8.4 release. 2009-06-26 19:33:52 +00:00
makefiles Allow out-of-tree builds on mingw and cygwin 2009-01-05 09:27:20 +00:00
pl Fix error cleanup failure caused by 8.4 changes in plpgsql to try to avoid 2009-07-18 19:15:50 +00:00
port 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Repair bug #4926 "too few pathkeys for mergeclauses". This example shows 2009-07-17 23:19:59 +00:00
timezone Update time zone data files to tzdata release 2009i: DST law changes in 2009-06-11 17:45:38 +00:00
tools Tighten typedef check for Linux. 2009-06-12 03:09:07 +00:00
tutorial 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Add the possibility to specify an explicit validator function for foreign-data 2009-02-24 10:06:36 +00:00
Makefile.global.in Fix the makefiles to fail cleanly if Perl is needed but not present. This 2009-06-23 03:46:00 +00:00
Makefile.shlib Allow out-of-tree builds on mingw and cygwin 2009-01-05 09:27:20 +00:00
nls-global.mk Do not msgmerge against /dev/null; merge against the pot file itself 2009-01-20 09:58:50 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00