Re: [9.2] Confusion over CacheRegisterSyscacheCallback

From: Marko Kreen <markokr(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [9.2] Confusion over CacheRegisterSyscacheCallback
Date: 2012-03-06 19:38:21
Message-ID: 20120306193821.GA12102@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 06, 2012 at 11:10:38AM -0500, Tom Lane wrote:
> Marko Kreen <markokr(at)gmail(dot)com> writes:
> > 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?
>
> Why would you need to know that? The reason the calculation function
> is static is that there's no apparent need to expose that information
> outside the syscache subsystem.

Because I need to invalidate my own internal state that corresponds
to particular system catalog row?

In current case (plproxy) I need to invalidate libpq connections
that are created from particular foreign server entry.

--
marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-03-06 19:39:32 Re: foreign key locks, 2nd attempt
Previous Message Heikki Linnakangas 2012-03-06 19:34:24 Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)