Concurrent transaction problem

From: "Ing(dot) Michael Petroni" <mpetroni(at)yahoo(dot)com>
To: pgsql-general(at)PostgreSQL(dot)org
Subject: Concurrent transaction problem
Date: 2000-12-16 11:56:19
Message-ID: 5.0.0.25.2.20001216125531.00a77eb0@pop.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Meskes 2000-12-16 16:27:18 Re: Great Bridge PostgreSQL products and services
Previous Message drevil 2000-12-16 08:02:02 How to make user-defined data types?