From: Andres Freund <andres@anarazel.de>
To: Jack Douglas <jack@douglastechnology.co.uk>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13523: Unexplained deadlocks (possible race condition)
Date: Thu, 30 Jul 2015 10:38:05 +0200
Message-ID: <20150730083805.GA3161@alap3.anarazel.de> (raw)
In-Reply-To: <015301d0caa0$f868f2f0$e93ad8d0$@douglastechnology.co.uk>
References: <20150728162823.25043.27625@wrigleys.postgresql.org>
<17665.1438105627@sss.pgh.pa.us>
<015301d0caa0$f868f2f0$e93ad8d0$@douglastechnology.co.uk>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2015-07-30 09:23:10 +0100, Jack Douglas wrote:
> If parsing the INSERT aquires the RowExclusiveLock, perhaps parsing the LOCK
> statement should also aquire the lock? That would mean the following
> principle in the documentation ("...The best defense against deadlocks is
> generally to avoid them by being certain that all applications using a
> database acquire locks on multiple objects in a consistent order...",
> http://www.postgresql.org/docs/9.4/static/explicit-locking.html#LOCKING-DEAD
> LOCKS) would be possible (or at least more easily understood) when using
> SQL-language functions.
I don't think that'd help at all? The problem here is the lock upgrade
from RowExclusiveLock to the exclusive lock, and that'll not be fixed by
that proposal?
Regards,
Andres
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, jack@douglastechnology.co.uk, tgl@sss.pgh.pa.us
Subject: Re: BUG #13523: Unexplained deadlocks (possible race condition)
In-Reply-To: <20150730083805.GA3161@alap3.anarazel.de>
References: <20150728162823.25043.27625@wrigleys.postgresql.org> <17665.1438105627@sss.pgh.pa.us> <015301d0caa0$f868f2f0$e93ad8d0$@douglastechnology.co.uk> <20150730083805.GA3161@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox