Isolation levels READ UNCOMMITTED and REPEATABLE READ

Started by Peter Eisentrautover 22 years ago4 messages
#1Peter Eisentraut
peter_e@gmx.net

I think we could allow users to set the transaction isolation level to
READ UNCOMMITTED or REPEATABLE READ and internally behave like READ
COMMITTED or SERIALIZABLE, respectively. The SQL standard seems to allow
this:

[speaking about SET TRANSACTION]

5) The isolation level of TXN is set to an implementation-defined
isolation level that will not exhibit any of the phenomena that
the explicit or implicit <level of isolation> would not exhibit,
as specified in Table 10, "SQL-transaction isolation levels and
the three phenomena".

This says that the SQL implementation can always isolate more than the
user requested, just not less.

If we did this, it would make the SQL interface more complete at little
cost.

Comments?

--
Peter Eisentraut peter_e@gmx.net

#2Dennis Bjorklund
db@zigo.dhs.org
In reply to: Peter Eisentraut (#1)
Re: Isolation levels READ UNCOMMITTED and REPEATABLE READ

On Thu, 9 Oct 2003, Peter Eisentraut wrote:

I think we could allow users to set the transaction isolation level to
READ UNCOMMITTED or REPEATABLE READ and internally behave like READ
COMMITTED or SERIALIZABLE, respectively. The SQL standard seems to allow
this:

Why not.

I would like a warning to be outputted also, but other then that, why not.

--
/Dennis

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: Isolation levels READ UNCOMMITTED and REPEATABLE READ

Peter Eisentraut <peter_e@gmx.net> writes:

I think we could allow users to set the transaction isolation level to
READ UNCOMMITTED or REPEATABLE READ and internally behave like READ
COMMITTED or SERIALIZABLE, respectively. The SQL standard seems to allow
this:

My reading is that the spec *requires* this. We have not done it
because there was some feeling that people would be confused if the
isolation levels appeared to exist but didn't really work as they
expected. But a notice or something could help address that concern.

regards, tom lane

#4Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#3)
Re: Isolation levels READ UNCOMMITTED and REPEATABLE READ

Added to TODO:

* Allow more ISOLATION LEVELS to be accepted, but issue a
warning for them

---------------------------------------------------------------------------

Tom Lane wrote:

Peter Eisentraut <peter_e@gmx.net> writes:

I think we could allow users to set the transaction isolation level to
READ UNCOMMITTED or REPEATABLE READ and internally behave like READ
COMMITTED or SERIALIZABLE, respectively. The SQL standard seems to allow
this:

My reading is that the spec *requires* this. We have not done it
because there was some feeling that people would be confused if the
isolation levels appeared to exist but didn't really work as they
expected. But a notice or something could help address that concern.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073