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

Commit67ec9ad

Browse files
committed
Fix session-lifespan memory leak when a plperl function is redefined:
we have to tell Perl it can release its compiled copy of the functiontext. Noted by Alexey Klyukin.Back-patch to 8.2 --- the problem exists further back, but this patchwon't work without modification, and it's probably not worth the trouble.
1 parent2203282 commit67ec9ad

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/pl/plperl/plperl.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plperl.c - perl as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.154 2009/11/2903:02:27 tgl Exp $
4+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.155 2009/11/2921:02:16 tgl Exp $
55
*
66
**********************************************************************/
77

@@ -1651,11 +1651,13 @@ compile_plperl_function(Oid fn_oid, bool is_trigger)
16511651

16521652
if (!uptodate)
16531653
{
1654+
hash_search(plperl_proc_hash,internal_proname,
1655+
HASH_REMOVE,NULL);
1656+
if (prodesc->reference)
1657+
SvREFCNT_dec(prodesc->reference);
16541658
free(prodesc->proname);
16551659
free(prodesc);
16561660
prodesc=NULL;
1657-
hash_search(plperl_proc_hash,internal_proname,
1658-
HASH_REMOVE,NULL);
16591661
}
16601662
}
16611663

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp