mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
Expose an API for calculating catcache hash values.
Now that cache invalidation callbacks get only a hash value, and not a tuple TID (per commits632ae6829fandb5282aa893), 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.
This commit is contained in:
@@ -174,6 +174,10 @@ extern HeapTuple SearchCatCache(CatCache *cache,
|
||||
Datum v3, Datum v4);
|
||||
extern void ReleaseCatCache(HeapTuple tuple);
|
||||
|
||||
extern uint32 GetCatCacheHashValue(CatCache *cache,
|
||||
Datum v1, Datum v2,
|
||||
Datum v3, Datum v4);
|
||||
|
||||
extern CatCList *SearchCatCacheList(CatCache *cache, int nkeys,
|
||||
Datum v1, Datum v2,
|
||||
Datum v3, Datum v4);
|
||||
|
||||
Reference in New Issue
Block a user