Re: Multiple index builds on same table - in one sweep? - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: Multiple index builds on same table - in one sweep?
Date
Msg-id BANLkTinTWXOKd6QunwBag1AJypYTVjYxRw@mail.gmail.com
Whole thread Raw
In response to Re: Multiple index builds on same table - in one sweep?  (Greg Smith <greg@2ndQuadrant.com>)
Responses Re: Multiple index builds on same table - in one sweep?
Re: Multiple index builds on same table - in one sweep?
List pgsql-performance
On Sun, Apr 10, 2011 at 8:29 PM, Greg Smith <greg@2ndquadrant.com> wrote:
> On 04/09/2011 01:23 PM, Chris Ruprecht wrote:
>>
>> Maybe, in a future release, somebody will develop something that can
>> create indexes as inactive and have a build tool build and activate them at
>> the same time. Food for thought?
>>
>
> Well, the most common case where this sort of thing happens is when people
> are using pg_restore to load a dump of an entire database.  In that case,
> you can use "-j" to run more than one loader job in parallel, which can
> easily end up doing a bunch of index builds at once, particularly at the
> end.  That already works about as well as it can because of the synchronized
> scan feature Tom mentioned.

FYI, in 8.3.13 I get this for all but one index:

ERROR:  deadlock detected
DETAIL:  Process 24488 waits for ShareLock on virtual transaction
64/825033; blocked by process 27505.
Process 27505 waits for ShareUpdateExclusiveLock on relation 297369165
of database 278059474; blocked by process 24488.

I'll try it on a big server running 8.4 and see what happens.

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: optimizer parameters
Next
From: "Anne Rosset"
Date:
Subject: Re: Slow query postgres 8.3