Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 40CB21337B4E for ; Mon, 11 Apr 2011 15:49:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 50070-01-10 for ; Mon, 11 Apr 2011 18:49:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id D8C221337C35 for ; Mon, 11 Apr 2011 15:39:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3BId38e006693; Mon, 11 Apr 2011 14:39:03 -0400 (EDT) To: Scott Marlowe cc: Greg Smith , pgsql-performance@postgresql.org Subject: Re: Multiple index builds on same table - in one sweep? In-reply-to: References: <4325.1302369004@sss.pgh.pa.us> <4DA2679D.5000207@2ndQuadrant.com> <4DA2B0A4.6050605@2ndquadrant.com> Comments: In-reply-to Scott Marlowe message dated "Mon, 11 Apr 2011 01:57:35 -0600" Date: Mon, 11 Apr 2011 14:39:03 -0400 Message-ID: <6692.1302547143@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/113 X-Sequence-Number: 43175 Scott Marlowe writes: > On Mon, Apr 11, 2011 at 1:41 AM, Greg Smith 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. regards, tom lane