]> granicus.if.org Git - postgresql/commit
Expose an API for calculating catcache hash values.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Mar 2012 19:51:13 +0000 (14:51 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Mar 2012 19:51:13 +0000 (14:51 -0500)
commitd4bf3c9c94305e692349fb6fe0c67e483b72ae87
treef8b6fb180e026683ad7a06ab723e98eb86986c9d
parente685a8e6651b0e55996e6eba6917302607866793
Expose an API for calculating catcache hash values.

Now that cache invalidation callbacks get only a hash value, and not a
tuple TID (per commits 632ae6829f7abda34e15082c91d9dfb3fc0f298b and
b5282aa893e565b7844f8237462cb843438cdd5e), the only way they can restrict
what they invalidate is to know what the hash values mean.  setrefs.c was
doing this via a hard-wired assumption but that seems pretty grotty, and
it'll only get worse as more cases come up.  So let's expose a calculation
function that takes the same parameters as SearchSysCache.  Per complaint
from Marko Kreen.
src/backend/optimizer/plan/setrefs.c
src/backend/utils/cache/catcache.c
src/backend/utils/cache/syscache.c
src/include/utils/catcache.h
src/include/utils/syscache.h