Re: Multiple index builds on same table - in one sweep?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Multiple index builds on same table - in one sweep?
Date: 2011-04-11 18:39:49
Message-ID: BANLkTimw0O0aLgsZ1jM4fa=CyDHM5nn3cQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Apr 11, 2011 at 12:39 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> writes:
>> On Mon, Apr 11, 2011 at 1:41 AM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
>>> Scott Marlowe wrote:
>>>> FYI, in 8.3.13 I get this for all but one index:
>>>> ERROR:  deadlock detected
>
>>> Is that trying to build them by hand?  The upthread request here is actually
>>> already on the TODO list at http://wiki.postgresql.org/wiki/Todo and it
>>> talks a bit about what works and what doesn't right now:
>
>> Yes, by hand.  It creates an entry for the index but lists but marks
>> it as INVALID
>
> Are you trying to use CREATE INDEX CONCURRENTLY?  AFAIR that doesn't
> support multiple index creations at the same time.  Usually you wouldn't
> want that combination anyway, since the point of CREATE INDEX
> CONCURRENTLY is to not prevent foreground use of the table while you're
> making the index --- and multiple index creations are probably going to
> eat enough I/O that you shouldn't be doing them during normal operations
> anyhow.
>
> Just use plain CREATE INDEX.

I thought they'd stand in line waiting on each other. I'll give it a try.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2011-04-11 19:29:29 Re: Linux: more cores = less concurrency.
Previous Message Tom Lane 2011-04-11 18:39:03 Re: Multiple index builds on same table - in one sweep?