Fix portalmem.c to avoid keeping a dangling pointer to a cached plan list

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 524d357d09cd42a1e88636f2bc6a66bc402ca0a1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-01-18T02:30:30Z
Releases: 8.4.3
Fix portalmem.c to avoid keeping a dangling pointer to a cached plan list
after it's released its reference count for the cached plan.  There are
code paths that might try to examine the plan list before noticing that
the portal is already in aborted state.  Report and diagnosis by Tatsuo
Ishii, though this isn't exactly his proposed patch.

Files

PathChange+/−
src/backend/utils/mmgr/portalmem.c modified +12 −9