Re: reindex table deadlock - Mailing list pgsql-general

From jaime soler
Subject Re: reindex table deadlock
Date
Msg-id 1415700669.7704.3.camel@gmail.com
Whole thread Raw
In response to reindex table deadlock  (Dan H <dw6881pr@gmail.com>)
List pgsql-general
El vie, 07-11-2014 a las 10:02 -0500, Dan H escribió:
> Hi,
>
> I encountered a deadlock while running 'reindex table TABLE1' in
> postgresql version 9.2.4
> The postgresql logs shows the two offending processes.
>
> 1st process was running reindex table TABLE1
> waiting for AccessExclusiveLock on primary key index of TABLE1
>
> 2nd process was running stored procedure that executes selects and
> deletes to TABLE1
> waiting for RowExclusiveLock on TABLE1.
>
> Is this the same lock upgrade deadlock issue that someone has
> previously mentioned with reindex?

Why don't you use create index concurrently to avoid the ACCESS
EXCLUSIVE lock and uses a SHARE UPDATE EXCLUSIVE lock?
>
>




pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: trigger Before or After
Next
From: Thomas Kellerer
Date:
Subject: pg_get_expr() hangs with uncommitted DDL transaction