Skip site navigation (1) Skip section navigation (2)

Re: create index concurrently blocks on transactions in other databases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: depesz(at)depesz(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: create index concurrently blocks on transactions in other databases
Date: 2007-09-06 19:55:49
Message-ID: 1473.1189108549@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> On Thu, 2007-09-06 at 12:43 +0200, hubert depesz lubaczewski wrote:
>> i dont really see why this would be neccessary - i understand that we
>> need to wait for transactions in the same db, but waiting for
>> transaction in another database?

> Manual says "and in addition it must wait for all existing transactions
> to terminate." This is needed for MVCC correctness and its not a bug.

No, it isn't needed for MVCC correctness.  We're just out-waiting
transactions that might try to use the index and not find what they
should in it.  AFAICS Hubert is right: there is no need to wait for
xacts in other DBs.  (At least for non-shared indexes, but we can't
support C.I.C. on shared tables anyway.)

This would have been painful to fix in 8.2 but it seems relatively
trivial in HEAD --- we just need another filter option in
GetCurrentVirtualXIDs.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Simon RiggsDate: 2007-09-06 20:47:29
Subject: Re: create index concurrently blocks on transactions inother databases
Previous:From: Pascal Van De GuchtDate: 2007-09-06 19:23:34
Subject: BUG #3604: lo_import does not work with filenames with accents

pgsql-patches by date

Next:From: Heikki LinnakangasDate: 2007-09-06 20:07:57
Subject: Re: HOT patch - version 15
Previous:From: Tom LaneDate: 2007-09-06 19:36:27
Subject: Re: HOT patch - version 15

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group