[9.2] Confusion over CacheRegisterSyscacheCallback - Mailing list pgsql-hackers

From Marko Kreen
Subject [9.2] Confusion over CacheRegisterSyscacheCallback
Date
Msg-id 20120306153331.GA11164@gmail.com
Whole thread Raw
Responses Re: [9.2] Confusion over CacheRegisterSyscacheCallback  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Commit b5282aa893: "Revise sinval code to remove no-longer-used tuple TID from inval messages."

dropped ItemPointer from callbacks and replaced it with "hashValue".
There seems to be 2 ways that new backend code calculates it:

- hashoid(oid), which seems to assume too much?
- CatalogCacheComputeTupleHashValue(), which is 'static'.

So my question is that after doing generic SearchSysCache() like:
  tup = SearchSysCache(USERMAPPINGUSERSERVER,       ObjectIdGetDatum(user_mapping->userid),
ObjectIdGetDatum(foreign_server->serverid),      0, 0);
 

what is the proper way to calculate the hashValue that 
will be given to callback?

-- 
marko



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Checksums, state of play
Next
From: Pavel Stehule
Date:
Subject: Re: elegant and effective way for running jobs inside a database