Re: GetCurrentVirtualXIDs() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GetCurrentVirtualXIDs()
Date
Msg-id 18674.1238857807@sss.pgh.pa.us
Whole thread Raw
In response to Re: GetCurrentVirtualXIDs()  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On Fri, 2009-04-03 at 18:28 -0400, Tom Lane wrote:
>> So on third thought I think the patch logic is sound; but I think that
>> as documentation we had better add another bool parameter to
>> GetCurrentVirtualXIDs indicating whether it's okay to ignore procs
>> with xmin = 0.

> That sounds better through being more explicit. I didn't consider
> whether the patched function was true in all cases, only that it looked
> correct in the current usage. Another lesson in future-proofing code.

I had another thought about this.  The point of the limitXmin filtering
is that we may exclude transactions whose oldest snapshot is provably
no older than our reference snapshot.  Wouldn't it be sufficient to
exclude those with xmin > reference snapshot xmin?  Currently we exclude
those with xmin >= reference snapshot xmax, which is obviously a weaker
condition.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Documentation Update: Document pg_start_backup checkpoint behavior
Next
From: Tom Lane
Date:
Subject: Re: Saner interval hash function