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


Thu, 9 Oct 2003 18:58:37 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
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


Thu, 9 Oct 2003 21:41:58 +0200 (CEST)
Dennis Bjorklund <db@zigo.dhs.org>
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

Mon, 13 Oct 2003 21:09:33 -0400
Tom Lane <tgl@sss.pgh.pa.us>
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

Sat, 25 Oct 2003 22:57:55 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Isolation levels READ UNCOMMITTED and REPEATABLE READ