Hi guys, I've some troubles with concurrent transactions on PgSql 7.0.3 on FreeBSD 3.2... ..can someone help about this case?
Thanx!
Session 0
At first let's create the table for our testcase and fill it with data...
tr_master=# create table seq (ch_name char(8), in_value integer not null default 0, primary key(ch_name)); NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'seq_pkey' for table 'seq' CREATE tr_master=# insert into seq values ('id_trans', 0); INSERT 23438 1 tr_master=# \q
Session 1
After closing session 0 let's start a new one:
tr_master=# begin; BEGIN tr_master=# set transaction isolation level serializable; SET VARIABLE tr_master=# select * from seq; ch_name | in_value ----------+---------- id_trans | 0 (1 row) tr_master=#
Session 2
We leave session 1 open and open another session 2 in a seperate shell:
tr_master=# begin; BEGIN tr_master=# set transaction isolation level serializable; SET VARIABLE tr_master=# select * from seq; NOTICE: current transaction is aborted, queries ignored until end of transaction block *ABORT STATE* tr_master=#
This happens also without setting the isolation level to serialzable. Why? There's only read-access in both sessions? Shouldn't we even be able to update the record in Session 1 and Session 2 should bring up the old initial values of the row?