Re: deadlock while re-indexing table - Mailing list pgsql-general

From Dave Cramer
Subject Re: deadlock while re-indexing table
Date
Msg-id 524EA782-E500-43C4-94DF-D9CCF2678929@fastcrypt.com
Whole thread Raw
In response to Re: deadlock while re-indexing table  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: deadlock while re-indexing table
List pgsql-general
On 12-Feb-08, at 10:37 AM, Tom Lane wrote:

> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Dave Cramer wrote:
>>> reindex table user_profile;
>>> ERROR:  deadlock detected
>>> DETAIL:  Process 32450 waits for AccessExclusiveLock on relation
>>> 194689112 of database 163880909; blocked by process 31236.
>>> Process 31236 waits for AccessShareLock on relation 194689110 of
>>> database 163880909; blocked by process 32450.
>
>> I don't find this very surprising ... I would suggest using "reindex
>> index" for each index instead.  I'm not sure if REINDEX TABLE is
>> supposed to be deadlock-free.
>
> It's not guaranteed to be so, but I'd think simple cases would be
> okay.  What's that other process doing?
>
The other process is inserting into the user_profile table.

Dave
>             regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq


pgsql-general by date:

Previous
From: Mark Cave-Ayland
Date:
Subject: Re: Query using cursors using 100% CPU
Next
From: Gregory Stark
Date:
Subject: Re: deadlock while re-indexing table