Обсуждение: Concurrent transaction problem

Поиск
Список
Период
Сортировка

Concurrent transaction problem

От
"Ing. Michael Petroni"
Дата:
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?

Re: Concurrent transaction problem

От
Tom Lane
Дата:
"Ing. Michael Petroni" <mpetroni@yahoo.com> writes:
> 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=#

I can't reproduce this.  It seems something is fairly broken with your
installation.  Did you compile the source yourself (if so with what
compiler and what configuration options?), or use an RPM (if so,
from where?)

            regards, tom lane

Re: Concurrent transaction problem

От
"Ing. Michael Petroni"
Дата:
I've compiled it from source, config was done with the following params:

./configure  --prefix=/usr/local/pgsql

As far as know there's no binary distribution for FreeBSD ;-(


regards,
mike


At 21:55 16.12.00 -0500, Tom Lane wrote:
>"Ing. Michael Petroni" <mpetroni@yahoo.com> writes:
> > 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=#
>
>I can't reproduce this.  It seems something is fairly broken with your
>installation.  Did you compile the source yourself (if so with what
>compiler and what configuration options?), or use an RPM (if so,
>from where?)
>
>                         regards, tom lane


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com