Re: Deadlock detected after pg_repack receives SIGINT

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Jiří Hlinka <jiri(dot)hlinka(at)gmail(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Deadlock detected after pg_repack receives SIGINT
Date: 2015-11-06 07:17:35
Message-ID: CAB7nPqSfA-3BSrLUnDu6d3LZqQBUJER409wCy056nMb+v8oWvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 6, 2015 at 4:08 PM, Jiří Hlinka <jiri(dot)hlinka(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2015-11-06 07:25:33 Re: is there any difference DROP PRIMARY KEY in oracle and postgres?
Previous Message Jiří Hlinka 2015-11-06 07:08:38 Re: Deadlock detected after pg_repack receives SIGINT