Re: Multiple index builds on same table - in one sweep?
От | Scott Marlowe |
---|---|
Тема | Re: Multiple index builds on same table - in one sweep? |
Дата | |
Msg-id | BANLkTinTWXOKd6QunwBag1AJypYTVjYxRw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Multiple index builds on same table - in one sweep? (Greg Smith <greg@2ndQuadrant.com>) |
Ответы |
Re: Multiple index builds on same table - in one sweep?
Re: Multiple index builds on same table - in one sweep? |
Список | 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 по дате отправления: