Re: Make HeapTupleSatisfiesMVCC more concurrent - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Make HeapTupleSatisfiesMVCC more concurrent
Date
Msg-id 19124.1440628188@sss.pgh.pa.us
Whole thread Raw
In response to Re: Make HeapTupleSatisfiesMVCC more concurrent  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 25 August 2015 at 21:51, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't mean to dismiss the potential for further optimization inside
>> XidInMVCCSnapshot (for instance, the one-XID-cache idea sounds promising);
>> but I think that's material for further research and a separate patch.

> Patch attached. Doesn't seem worth a separate thread.

This doesn't seem right to me: it only caches the case where the XID is
found to be present in the snapshot, whereas I think probably we should
remember the result in both cases (present or not).

Moreover, in the subxip-overflowed case where we replace an
originally-inquired-of subxact xid with its parent, what you're caching is
the parent xid, which will fail to match subsequent queries.  Shouldn't we
cache the originally inquired-of xid?

The question of whether to cache "false" results perhaps requires some
performance testing.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: 9.5 release notes
Next
From: Andres Freund
Date:
Subject: Re: Custom Scans and private data