Re: deadlock while re-indexing table

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: deadlock while re-indexing table
Date: 2008-02-12 14:32:51
Message-ID: 20080212143251.GB14683@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mario Lopez 2008-02-12 14:45:51 Re: Working with huge amount of data. RESULTS!
Previous Message Glyn Astill 2008-02-12 14:21:35 Query using cursors using 100% CPU