Re: Concurrency - Mailing list pgsql-admin

From Simon Riggs
Subject Re: Concurrency
Date
Msg-id 1115665123.3830.38.camel@localhost.localdomain
Whole thread Raw
In response to Concurrency  (Kris Kiger <kris@musicrebellion.com>)
Responses Re: Concurrency
List pgsql-admin
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?  Thanks
> in advance

The lock queue is served in FIFO sequence. It is predictable, but if you
don't know which order they were submitted in it might be hard to
determine what that predictable order is, if they were submitted almost
at the same time.

...but you shouldn't use locking as a queuing mechanism.

Best Regards, Simon Riggs


pgsql-admin by date:

Previous
From: Simon Riggs
Date:
Subject: Re: conversion security update may have slowed our system?
Next
From: Tom Lane
Date:
Subject: Re: conversion security update may have slowed our system?