summaryrefslogtreecommitdiff
path: root/src/backend/regex
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-02-11 18:06:35 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-02-11 18:06:35 -0500
commit03c66ca5dfd4e0e8fec506315f581b21817f47f4 (patch)
treec38d685a92bfe51e6adce52afe731240b4d3b81a /src/backend/regex
parent54660723715df39ba2c1b71ee0c44012b3d63acc (diff)
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/regex')
0 files changed, 0 insertions, 0 deletions