Simon Riggs <si...@2ndquadrant.com> writes:
> On 25 August 2015 at 21:51, Tom Lane <t...@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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to