forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit58a9596
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, plpgsqlcalls such functions for purposes of type conversion, and was calling themin its procedure context. Therefore, any leaked memory would not berecovered until the end of the plpgsql function. If such a conversionwas done within a loop, quite a bit of memory could get consumed. Fix bycalling such functions in the transient "eval_econtext", and adjust otherlogic to match. Back-patch to all supported versions.Andres Freund, Jan Urbański, Tom Lane1 parent59de132 commit58a9596
1 file changed
+96
-67
lines changed0 commit comments
Comments
(0)