Re: [GENERAL] Concurrency problem building indexes

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Wes <wespvp(at)syntegra(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Concurrency problem building indexes
Date: 2006-04-24 22:54:50
Message-ID: 20060424225450.GG64695@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

moving to -hackers

On Sun, Apr 23, 2006 at 09:06:59AM -0500, Wes wrote:
> Postgres: 8.1.3
> OS: Mac OS X 10.4.6
>
> I've run into another concurrency issue - parallel building of indexes.
> When I try to build multiple indexes at a time, I randomly get:
>
> ERROR: tuple concurrently updated
>
> The following thread talks about this, but there is no answer.
>
> <http://archives.postgresql.org/pgsql-hackers/2002-07/msg00969.php>
>
> How can I safely build indexes in parallel?
>
> At this point, I'm only trying to build two at a time. I will be building
> indexes for tables with any where from a few rows to 100 million rows on a
> daily basis - I need to maximize performance.

Since this seems to only be an issue due to trying to update pg_class
for the table, perhaps CREATE INDEX can just ignore errors there?
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mlartz@gmail.com 2006-04-24 22:56:15 Re: Partitioning rule not behaving as expected
Previous Message Joshua D. Drake 2006-04-24 22:50:25 Re: Database Selection

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-04-25 00:14:33 Re: [GENERAL] Concurrency problem building indexes
Previous Message Bruce Momjian 2006-04-24 22:21:18 Re: 2x compile warning