SET TRANSACTION ISOLATION LEVEL SERIALIZABLE on 7.0
Hi!!
On a debian 2.2.19:
$ /usr/local/pgsql/bin/psql --version
psql (PostgreSQL) 7.0.3
contains readline, history support
Portions Copyright (c) 1996-2000, PostgreSQL, Inc
Portions Copyright (c) 1996 Regents of the University of California
Read the file COPYRIGHT or use the command \copyright to see the
usage and distribution terms.
uidb=# SET TRANSACTION ISOLATION LEVEL SERIALIZABLE ;
SET VARIABLE
uidb=# SHOW TRANSACTION ISOLATION LEVEL ;
NOTICE: TRANSACTION ISOLATION LEVEL is READ COMMITTED
SHOW VARIABLE
Has the variable really been setted?
Is it a bug of the SHOW or what?
Thanks.
Enrico Mangano
Netsoftware Division
______________
NETHOUSE S.R.L.
Cso Re Umberto I, 57 - 10128 Torino - Italy
Tel. +39-011-581.581 - Fax +39-011-581.591
http://www.nethouse.it - mailto:enrico.mangano@nethouse.it
Enrico Mangano writes:
uidb=# SET TRANSACTION ISOLATION LEVEL SERIALIZABLE ;
SET VARIABLE
uidb=# SHOW TRANSACTION ISOLATION LEVEL ;
NOTICE: TRANSACTION ISOLATION LEVEL is READ COMMITTED
SHOW VARIABLEHas the variable really been setted?
Yes, but if was reset after the transaction finished. What you're after
is SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
in 7.1. (Yes, if I had been in charge I would have chosen a more concise
name.)
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Enrico Mangano writes:
uidb=# SET TRANSACTION ISOLATION LEVEL SERIALIZABLE ;
SET VARIABLE
uidb=# SHOW TRANSACTION ISOLATION LEVEL ;
NOTICE: TRANSACTION ISOLATION LEVEL is READ COMMITTED
SHOW VARIABLEHas the variable really been setted?
Yes, but if was reset after the transaction finished. What you're after
is SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
in 7.1. (Yes, if I had been in charge I would have chosen a more concise
name.)
Setting session characteristics would set it for session, but
I guess he want to set transaction isolation level for a transaction
in this case??
# begin;
# set transaction isolation level serializable;
# show variable;
NOTICE: TRANSACTION ISOLATION LEVEL is SERIALIZABLE
SHOW VARIABLE
(Don't forget to set isolation level each transaction that needs serializable
level isolation.)
--
Yasuo Ohgaki