From: Jack Douglas <jack@douglastechnology.co.uk>
To: '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 09:23:10 +0100
Message-ID: <015301d0caa0$f868f2f0$e93ad8d0$@douglastechnology.co.uk> (raw)
In-Reply-To: <17665.1438105627@sss.pgh.pa.us>
References: <20150728162823.25043.27625@wrigleys.postgresql.org>
<17665.1438105627@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
> There have been discussions of reimplementing SQL-language functions so
that parsing occurs one statement at a time, but don't hold your breath
about something happening in that direction; it doesn't seem to be a high
priority concern for anybody.
Perhaps it is worth considering a less drastic change if that is not on the
cards in the immediate future?
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.
--
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: jack@douglastechnology.co.uk, tgl@sss.pgh.pa.us
Subject: Re: BUG #13523: Unexplained deadlocks (possible race condition)
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>
* 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