Re: reindex table deadlock

From: jaime soler <jaime(dot)soler(at)gmail(dot)com>
To: Dan H <dw6881pr(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: reindex table deadlock
Date: 2014-11-11 10:11:09
Message-ID: 1415700669.7704.3.camel@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2014-11-11 12:33:12 pg_get_expr() hangs with uncommitted DDL transaction
Previous Message Albe Laurenz 2014-11-11 08:19:43 Re: [GENERAL] trigger Before or After