Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd062245

Browse files
committed
Improve memory management for PL/Tcl functions.
Formerly, the memory used to represent a PL/Tcl function was allocated withmalloc() or in TopMemoryContext, and we'd leak it all if the function gotredefined during the session. Instead, create a per-function context andkeep everything in or under that context. Add a reference-countingmechanism (like the one plpgsql has long had) so that we can safely cleanup an old function definition, either immediately if it's not beingexecuted or at the end of the outermost execution.Currently, we only detect that a cached function is obsolete when we nextattempt to call that function. So this covers the updated-definition casebut leaves cruft around after DROP FUNCTION. It's not clear whether it'sworth installing a syscache invalidation callback to watch for drops;none of the other PLs do, so for now we won't do it here either.Michael Paquier and Tom LaneDiscussion: <CAB7nPqSOyAsHC6jL24J1B+oK3p=yyNoFU0Vs_B6fd2kdd5g5WQ@mail.gmail.com>
1 parent65a588b commitd062245

File tree

1 file changed

+144
-116
lines changed

1 file changed

+144
-116
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp