Re: Reduce the memcpy call from SearchCatCache - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reduce the memcpy call from SearchCatCache
Date
Msg-id 6020.1246976526@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reduce the memcpy call from SearchCatCache  (Atsushi Ogawa <a_ogawa@hi-ho.ne.jp>)
List pgsql-hackers
Atsushi Ogawa <a_ogawa@hi-ho.ne.jp> writes:
> Tom Lane writes:
>> 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.

Try turning on CLOBBER_CACHE_ALWAYS or CLOBBER_CACHE_RECURSIVELY to
get a demonstration of what can happen under the right conditions.

I think the only really safe way to do what you propose would be to
refactor the ScanKey API to separate the datum values and is-null
flags from the more static parts of the data structure.  That would
be a pretty large/invasive patch, and the numbers cited here don't
seem to me to justify the work.  It's even possible that it could
end up being a net performance loss due to having to pass around more
pointers :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Atsushi Ogawa
Date:
Subject: Re: Reduce the memcpy call from SearchCatCache
Next
From: Tom Lane
Date:
Subject: Re: Small foreign key error message improvement