[9.2] Confusion over CacheRegisterSyscacheCallback

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [9.2] Confusion over CacheRegisterSyscacheCallback
Date: 2012-03-06 15:33:31
Message-ID: 20120306153331.GA11164@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-03-06 15:37:06 Re: elegant and effective way for running jobs inside a database
Previous Message Pavel Stehule 2012-03-06 15:33:22 Re: elegant and effective way for running jobs inside a database