Re: Deadlock detected after pg_repack receives SIGINT - Mailing list pgsql-general

From Michael Paquier
Subject Re: Deadlock detected after pg_repack receives SIGINT
Date
Msg-id CAB7nPqSfA-3BSrLUnDu6d3LZqQBUJER409wCy056nMb+v8oWvg@mail.gmail.com
Whole thread Raw
In response to Re: Deadlock detected after pg_repack receives SIGINT  (Jiří Hlinka <jiri.hlinka@gmail.com>)
List pgsql-general
On Fri, Nov 6, 2015 at 4:08 PM, Jiří Hlinka <jiri.hlinka@gmail.com> wrote:
> my point was, that pg_repack deadlocked itself - I think it should be
> possible to guarantee deadlock-free behavior at least via advisory lock for
> operations of pg_repack itself (I understand it is not possible to guarantee
> this across more apps). If it is not true, I'd be glad to hear I'm wrong
> (really!).

Er, well. Based on the information given there is actually no evidence
that pg_repack is actually deadlocked. The code path calling the
cleanup callback after receiving SIGINT waiting for the transaction
working on the trigger being dropped to finish. We could say that
there is a deadlock if the transaction inserting data to repack.log%
is actually holding a lock that conflicts with the trigger being
dropped.
--
Michael


pgsql-general by date:

Previous
From: Jiří Hlinka
Date:
Subject: Re: Deadlock detected after pg_repack receives SIGINT
Next
From: Thomas Kellerer
Date:
Subject: Re: is there any difference DROP PRIMARY KEY in oracle and postgres?