aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-09-09 20:33:03 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-09-09 20:33:03 -0400
commitef06dca97504cda3cff852314532338c86d3ccc5 (patch)
treefdf3dd5f51454f6c96f79d44f8113c07998809c2 /src/backend/access/gist/gist.c
parent1e214507e5b5d604ea8d8d4e7e564b673df8c8e0 (diff)
downloadpostgresql-ef06dca97504cda3cff852314532338c86d3ccc5.tar.gz
postgresql-ef06dca97504cda3cff852314532338c86d3ccc5.zip
Make plperl safe against functions that are redefined while running.
validate_plperl_function() supposed that it could free an old plperl_proc_desc struct immediately upon detecting that it was stale. However, if a plperl function is called recursively, this could result in deleting the struct out from under an outer invocation, leading to misbehavior or crashes. Add a simple reference-count mechanism to ensure that such structs are freed only when the last reference goes away. Per investigation of bug #7516 from Marko Tiikkaja. I am not certain that this error explains his report, because he says he didn't have any recursive calls --- but it's hard to see how else it could have crashed right there. In any case, this definitely fixes some problems in the area. Back-patch to all active branches.
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions