Re: GetCurrentVirtualXIDs()
От | Simon Riggs |
---|---|
Тема | Re: GetCurrentVirtualXIDs() |
Дата | |
Msg-id | 1232128020.31669.71.camel@ebony.2ndQuadrant обсуждение исходный текст |
Ответ на | Re: GetCurrentVirtualXIDs() (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Fri, 2009-01-16 at 12:15 -0500, Tom Lane wrote: > Simon Riggs <simon@2ndQuadrant.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. > > Because they might be about to change xmin to something real? True, they might. GetSnapshotData() involuntarily sets xmin in their proc, so they would have to be doing some strange footwork: they would have to have started GetSnapshotData() *before* the index build and not finished it until *after* we check GetCurrentVirtualXIDs() (after the index build). If you think that is a serious possibility, then grabbing ProcArrayLock in exclusive mode should close that gap. I can't see a reason for idle-in-transaction sessions to block index builds. -- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support
В списке pgsql-hackers по дате отправления: