Re: [BUGS] Status of issue 4593 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUGS] Status of issue 4593
Date
Msg-id 28125.1231866988@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] Status of issue 4593  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: [BUGS] Status of issue 4593  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote: 
>> If that's what you want then you run the transaction in serializable
>> mode.  The point of doing it in READ COMMITTED mode is that you
>> don't want such a failure.
> Wait a minute -- there is not such guarantee in PostgreSQL when you
> start using WITH UPDATE on SELECT statements in READ COMMITTED mode. 
> By starting two transactions in READ COMMITTED, and having each do two
> SELECTs WITH UPDATE (in opposite order) I was able to generate this:
> ERROR:  deadlock detected

Huh?  Deadlocks were not the issue here.  What you asked for was a
failure if someone else had updated the rows you're selecting for
update.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: per-database locale: createdb switches
Next
From: Stephen Frost
Date:
Subject: Re: New patch for Column-level privileges