Skip site navigation (1) Skip section navigation (2)

pgsql: Remove CatalogCacheFlushRelation, and the reloidattr

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove CatalogCacheFlushRelation, and the reloidattr
Date: 2010-02-08 05:53:55
Message-ID: 20100208055355.4ABAE7541B9@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Remove CatalogCacheFlushRelation, and the reloidattr infrastructure that was
needed by nothing else.

The restructuring I just finished doing on cache management exposed to me how
silly this routine was.  Its function was to go into the catcache and blow
away all entries related to a given relation when there was a relcache flush
on that relation.  However, there is no point in removing a catcache entry
if the catalog row it represents is still valid --- and if it isn't valid,
there must have been a catcache entry flush on it, because that's triggered
directly by heap_update or heap_delete on the catalog row.  So this routine
accomplished nothing except to blow away valid cache entries that we'd very
likely be wanting in the near future to help reconstruct the relcache entry.
Dumb.

On top of which, it required a subtle and easy-to-get-wrong attribute in
syscache definitions, ie, the column containing the OID of the related
relation if any.  Removing that is a very useful maintenance simplification.

Modified Files:
--------------
    pgsql/src/backend/utils/cache:
        catcache.c (r1.149 -> r1.150)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/catcache.c?r1=1.149&r2=1.150)
        relcache.c (r1.303 -> r1.304)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/relcache.c?r1=1.303&r2=1.304)
        syscache.c (r1.124 -> r1.125)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/syscache.c?r1=1.124&r2=1.125)
    pgsql/src/include/utils:
        catcache.h (r1.70 -> r1.71)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/catcache.h?r1=1.70&r2=1.71)

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2010-02-08 09:08:52
Subject: pgsql: Remove piece of code to zero out minRecoveryPoint when starting
Previous:From: User NanardonDate: 2010-02-08 05:19:34
Subject: pgrpm - pgrpm: - convert the right variable from binary to hex value for

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group