Re: BUG #15321: XMLTABLE leaks memory like crazy - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15321: XMLTABLE leaks memory like crazy
Date
Msg-id 17553.1534086692@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15321: XMLTABLE leaks memory like crazy  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: BUG #15321: XMLTABLE leaks memory like crazy  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-bugs
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> Attached patch is the same logic as before but with more comments.

This looks generally reasonable to me, but what's the point of doing
two MemoryContextReset calls in tfuncFetchRows?  Doing one at the
end should be sufficient to guarantee that the context is empty already
at the next call.

Also, I'd be inclined to rename "perValueCxt" to something else,
it's not really correctly named for this usage pattern.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: BUG #15321: XMLTABLE leaks memory like crazy
Next
From: Andrew Gierth
Date:
Subject: Re: BUG #15321: XMLTABLE leaks memory like crazy