Re: Reduce the memcpy call from SearchCatCache

From: Atsushi Ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reduce the memcpy call from SearchCatCache
Date: 2009-07-07 13:03:11
Message-ID: 4A53478F.6000203@hi-ho.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:
> Atsushi Ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp> writes:
> > Attached patch is reduce the memcpy calls from SearchCatCache
> > and SearchCatCacheList. This patch directly uses cache->cc_skey
> > in looking for hash table.
>
> How much did you test this patch? I'm fairly sure it will break
> things.
> There are cases where cache lookups happen recursively.

I tested regression test and pgbench. However, I did not consider
recursive case. I revised a patch for safe recursive call.
But I cannot find test case in which recursive call happens.

In my understanding, recursive call at SearchCatCache does not happen
while looking for hash table. The recursive call happens while reading
the relation. If the cache->cc_skey is copied before read the relation,
I think it is safe.

best regards,

--- Atsushi Ogawa

Attachment Content-Type Size
search_catcache.patch.r1 text/plain 3.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-07 14:22:06 Re: Reduce the memcpy call from SearchCatCache
Previous Message Teodor Sigaev 2009-07-07 12:53:37 Re: WIP: generalized index constraints