Content-Length: 234545 | pFad | http://github.com/postgrespro/postgres/commit/58a9596ed4a509467e1781b433ff9c65a4e5b5ce

FB Fix I/O-conversion-related memory leaks in plpgsql. · postgrespro/postgres@58a9596 · GitHub
Skip to content

Commit 58a9596

Browse files
committed
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
1 parent 59de132 commit 58a9596

File tree

1 file changed

+96
-67
lines changed

1 file changed

+96
-67
lines changed

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/58a9596ed4a509467e1781b433ff9c65a4e5b5ce

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy