From: Simon Riggs <simon@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kris Kiger <kris@musicrebellion.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Concurrency
Date: Mon, 09 May 2005 22:38:35 +0100
Message-ID: <1115674715.3830.78.camel@localhost.localdomain> (raw)
In-Reply-To: <515.1115666320@sss.pgh.pa.us>
References: <671060015.20031010095617@roaddep.ru>
<427F9C06.3070206@musicrebellion.com>
<1115665123.3830.38.camel@localhost.localdomain>
<515.1115666320@sss.pgh.pa.us>
On Mon, 2005-05-09 at 15:18 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > On Mon, 2005-05-09 at 12:21 -0500, Kris Kiger wrote:
> >> Quick question. I lock a table, call it table X, and then issue two
> >> updates on that table. The two updates are left waiting. I then unlock
> >> the table. The two updates go through. My question is, is there a
> >> predictable way to determine which query will be executed first?
>
> > The lock queue is served in FIFO sequence.
>
> ... usually. We will promote later arrivals in front of older ones if
> the alternative would be a deadlock (eg, the later one already holds
> some lock that would block the earlier one).
Thats part of deadlock detection? I had thought we just blew one away...
Thanks,
Best Regards, Simon Riggs
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-admin@postgresql.org
Cc: simon@2ndquadrant.com, tgl@sss.pgh.pa.us, kris@musicrebellion.com
Subject: Re: Concurrency
In-Reply-To: <1115674715.3830.78.camel@localhost.localdomain>
References: <671060015.20031010095617@roaddep.ru> <427F9C06.3070206@musicrebellion.com> <1115665123.3830.38.camel@localhost.localdomain> <515.1115666320@sss.pgh.pa.us> <1115674715.3830.78.camel@localhost.localdomain>
* 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