pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDeadlock during CREATE INDEX CONCURRENTLY, but index still created
3+ messages / 2 participants
[nested] [flat]
* Deadlock during CREATE INDEX CONCURRENTLY, but index still created
@ 2011-05-18 15:19 Florian Weimer <fweimer@bfk.de>
0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2011-05-18 15:19 UTC (permalink / raw)
To: pgsql-admin
I've run two CREATE INDEX CONCURRENTLY on the same table in parallel,
and one of them errored out with:
2011-05-18 14:30:06.645 UTC bfk 23530 postgres ERROR: deadlock
detected
2011-05-18 14:30:06.645 UTC bfk 23530 postgres DETAIL: Process
23530 waits for ShareLock on virtual transaction 9/28523127; blocked by
process 26612.
Process 26612 waits for ShareUpdateExclusiveLock on relation
229701 of database 229155; blocked by process 23530.
Process 23530: CREATE INDEX CONCURRENTLY idx1 ON tbl (col1);
Process 26612: CREATE INDEX CONCURRENTLY idx2 ON tbl (col);
The curious thing is that both indexes were created. I would have
expected that the creation of idx1 would be rolled back.
Are both of the usable, or should I re-create idx1 from scratch?
This is with PostgreSQL 8.4.7. (The changelog for 8.4.8 does not list
anything which appears to be relevant.)
--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Deadlock during CREATE INDEX CONCURRENTLY, but index still created
@ 2011-05-18 15:32 Florian Weimer <fweimer@bfk.de>
parent: Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2011-05-18 15:32 UTC (permalink / raw)
To: Scott Marlowe <scott.marlowe@gmail.com>; +Cc: pgsql-admin
* Scott Marlowe:
> On Wed, May 18, 2011 at 9:19 AM, Florian Weimer <fweimer@bfk.de> wrote:
>> I've run two CREATE INDEX CONCURRENTLY on the same table in parallel,
>> and one of them errored out with:
>> The curious thing is that both indexes were created. I would have
>> expected that the creation of idx1 would be rolled back.
>>
>> Are both of the usable, or should I re-create idx1 from scratch?
>
> They should be marked invalid.
Ah, thanks, I see it now. I guess this answers my question. 8-)
--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Deadlock during CREATE INDEX CONCURRENTLY, but index still created
@ 2011-05-18 15:33 Scott Marlowe <scott.marlowe@gmail.com>
parent: Florian Weimer <fweimer@bfk.de>
0 siblings, 1 reply; 3+ messages in thread
From: Scott Marlowe @ 2011-05-18 15:33 UTC (permalink / raw)
To: Florian Weimer <fweimer@bfk.de>; +Cc: pgsql-admin
On Wed, May 18, 2011 at 9:19 AM, Florian Weimer <fweimer@bfk.de> wrote:
> I've run two CREATE INDEX CONCURRENTLY on the same table in parallel,
> and one of them errored out with:
> The curious thing is that both indexes were created. I would have
> expected that the creation of idx1 would be rolled back.
>
> Are both of the usable, or should I re-create idx1 from scratch?
They should be marked invalid.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-05-18 15:33 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 15:19 Deadlock during CREATE INDEX CONCURRENTLY, but index still created Florian Weimer <fweimer@bfk.de>
2011-05-18 15:33 ` Scott Marlowe <scott.marlowe@gmail.com>
2011-05-18 15:32 ` Florian Weimer <fweimer@bfk.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox