Use a private memory context to store rule information in each relcache

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

Commit: b41f4ab8c448fc1bb13b52d00c9c4f1868d97941
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2000-06-30T07:04:23Z
Releases: 7.1.1
Use a private memory context to store rule information in each relcache
entry that has rules.  This allows us to release the rule parsetrees
on relcache flush without needing a working freeObject() routine.
Formerly, the rule trees were leaked permanently at relcache flush.
Also, clean up handling of rule creation and deletion --- there was
not sufficient locking of the relation being modified, and there was
no reliable notification of other backends that a relcache reload
was needed.  Also, clean up relcache.c code so that scans of system
tables needed to load a relcache entry are done in the caller's
memory context, not in CacheMemoryContext.  This prevents any
un-pfreed memory from those scans from becoming a permanent memory
leak.

Files