aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-02-11 18:06:24 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-02-11 18:06:24 -0500
commit58a9596ed4a509467e1781b433ff9c65a4e5b5ce (patch)
treeacf2d05253df4d0899432b23fe286b874fdc6f26 /src/backend/executor/nodeModifyTable.c
parent59de132f9a578ae5d2909228484a61309df986e0 (diff)
downloadpostgresql-58a9596ed4a509467e1781b433ff9c65a4e5b5ce.tar.gz
postgresql-58a9596ed4a509467e1781b433ff9c65a4e5b5ce.zip
Fix I/O-conversion-related memory leaks in plpgsql.
Datatype I/O functions are allowed to leak memory in CurrentMemoryContext, since they are generally called in short-lived contexts. However, plpgsql calls such functions for purposes of type conversion, and was calling them in its procedure context. Therefore, any leaked memory would not be recovered until the end of the plpgsql function. If such a conversion was done within a loop, quite a bit of memory could get consumed. Fix by calling such functions in the transient "eval_econtext", and adjust other logic to match. Back-patch to all supported versions. Andres Freund, Jan UrbaƄski, Tom Lane
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions