Re: [HACKERS] GetCurrentVirtualXIDs()

2009-04-04 Thread Tom Lane
Simon Riggs writes: > No need to wait for idle-in-transaction sessions during index builds. > GetCurrentVirtualXIDs() specifically *includes* backends that have > proc->xmin == InvalidTransactionId (0), but I'm not sure why. Applied with the discussed tweaks. I also added some logic to make Defi

Re: [HACKERS] GetCurrentVirtualXIDs()

2009-04-04 Thread Tom Lane
Simon Riggs 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.

Re: [HACKERS] GetCurrentVirtualXIDs()

2009-04-04 Thread Simon Riggs
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 thro

Re: [HACKERS] GetCurrentVirtualXIDs()

2009-04-03 Thread Tom Lane
Simon Riggs writes: > However, the basic premise is that idle-in-transaction sessions do not > need to block index builds. [ thinks for awhile... ] Actually, I believe that your premise is correct; the problem is with your proof ;-). Considering only the xmins is insufficient to prove that this

Re: [HACKERS] GetCurrentVirtualXIDs()

2009-04-03 Thread Simon Riggs
On Fri, 2009-04-03 at 15:46 -0400, Tom Lane wrote: > Simon Riggs writes: > > No need to wait for idle-in-transaction sessions during index builds. > > GetCurrentVirtualXIDs() specifically *includes* backends that have > > proc->xmin == InvalidTransactionId (0), but I'm not sure why. > > On furth

Re: [HACKERS] GetCurrentVirtualXIDs()

2009-04-03 Thread Tom Lane
Simon Riggs writes: > No need to wait for idle-in-transaction sessions during index builds. > GetCurrentVirtualXIDs() specifically *includes* backends that have > proc->xmin == InvalidTransactionId (0), but I'm not sure why. On further consideration, this patch is simply *wrong*, and would still

Re: [HACKERS] GetCurrentVirtualXIDs()

2009-01-16 Thread Simon Riggs
On Fri, 2009-01-16 at 12:15 -0500, Tom Lane wrote: > Simon Riggs writes: > > No need to wait for idle-in-transaction sessions during index builds. > > GetCurrentVirtualXIDs() specifically *includes* backends that have > > proc->xmin == InvalidTransactionId (0), but I'm not sure why. > > Because

Re: [HACKERS] GetCurrentVirtualXIDs()

2009-01-16 Thread Tom Lane
Simon Riggs writes: > No need to wait for idle-in-transaction sessions during index builds. > GetCurrentVirtualXIDs() specifically *includes* backends that have > proc->xmin == InvalidTransactionId (0), but I'm not sure why. Because they might be about to change xmin to something real?

[HACKERS] GetCurrentVirtualXIDs()

2009-01-16 Thread Simon Riggs
No need to wait for idle-in-transaction sessions during index builds. GetCurrentVirtualXIDs() specifically *includes* backends that have proc->xmin == InvalidTransactionId (0), but I'm not sure why. $SUBJECT is currently used by DefineIndex() to wait for all backends that might be able to see ind