Re: GetCurrentVirtualXIDs()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GetCurrentVirtualXIDs()
Date: 2009-04-04 15:10:07
Message-ID: 18674.1238857807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-04 15:16:24 Re: Saner interval hash function
Previous Message Tom Lane 2009-04-04 14:40:42 Re: Documentation Update: Document pg_start_backup checkpoint behavior