diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-07 00:58:57 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-07 00:58:57 +0000 |
commit | cd1aae586498a348876b4804bdd1bb7cc743d395 (patch) | |
tree | a8f3286d3c90249a85b00bad2fbe4d9413ab3d4f /src/backend/commands/indexcmds.c | |
parent | f8942f4a15fa5baa51c52491147a1bb910532332 (diff) | |
download | postgresql-cd1aae586498a348876b4804bdd1bb7cc743d395.tar.gz postgresql-cd1aae586498a348876b4804bdd1bb7cc743d395.zip |
Allow CREATE INDEX CONCURRENTLY to disregard transactions in other
databases, per gripe from hubert depesz lubaczewski. Patch from
Simon Riggs.
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index ac56b583f17..5c418f8b7a3 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.163 2007/09/05 18:10:47 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.164 2007/09/07 00:58:56 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -535,10 +535,12 @@ DefineIndex(RangeVar *heapRelation, * * We can exclude any running transactions that have xmin >= the xmax of * our reference snapshot, since they are clearly not interested in any - * missing older tuples. Also, GetCurrentVirtualXIDs never reports our - * own vxid, so we need not check for that. + * missing older tuples. Transactions in other DBs aren't a problem + * either, since they'll never even be able to see this index. + * Also, GetCurrentVirtualXIDs never reports our own vxid, so we + * need not check for that. */ - old_snapshots = GetCurrentVirtualXIDs(ActiveSnapshot->xmax); + old_snapshots = GetCurrentVirtualXIDs(ActiveSnapshot->xmax, false); while (VirtualTransactionIdIsValid(*old_snapshots)) { |