On Thu, Nov 15, 2012 at 6:42 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Tue, 2012-11-06 at 17:55 -0600, Merlin Moncure wrote:
>> So given that -- the patch simple adds an extra check when/where hint
>> bit status is checked in the visibility routines (currently, only
>> HeapTupleSatisfiesMVCC is done but all the applicable visibility
>> routines should be done). Basically, the way it works is like this:
>> *) is hint bit set?
>> *) if not? does the examined xid match the last examined one?
>> *) if so, and the cached hint bit matches the one want, proceeed as if
>> hint bit was set
> Can you clarify the difference between this and
> cachedFetchXid/cachedFetchXidStatus? Do we need to keep those if your
> patch is accepted?
Very little, except:
*) transam.c managed cache is unable to influence the specific code
path through the visibility routines, at least not without significant
refactoring -- everything that happens in tqual.c should be inlined.
I played with doing it all in transam.c a while back and didn't much
like how it turned out. That doesn't mean it can't work though.
*) There are a couple of important looking code paths that communicate
directly with transam.c. For example, in procarray.c
ProcArrayApplyRecoveryInfo(). Removing transam.c cache could turn
into fairly significant regression if that code is performance
sensitive -- that would have to be studied before doing that.
Maybe abstracting 'last xid cache' along with hint bit management out
of both transam.c and tqual.c into something like 'hints.c' is
appropriate, but that's a more invasive change.
In response to
pgsql-hackers by date
|Next:||From: Hannu Krosing||Date: 2012-11-16 14:27:07|
|Subject: Re: another idea for changing global configuration settings
|Previous:||From: Cédric Villemain||Date: 2012-11-16 14:22:22|
|Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL|