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 17:44:13
Message-ID: 22820.1238867053@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:
> 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
DefineIndex recheck the GetCurrentVirtualXIDs output each time it is
about to wait for another session. If we observe some other session
to have xmin = 0 at any one of those instants, we don't have to
wait for it. Not sure how much that will really help in practice,
but it can't hurt.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-04-04 21:13:13 monitoring-stats.html documentation
Previous Message Greg Stark 2009-04-04 15:42:59 Re: Saner interval hash function