• Tom Lane's avatar
    Use a private memory context to store rule information in each relcache · b41f4ab8
    Tom Lane authored
    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.
    b41f4ab8
index.c 60.4 KB