Skip site navigation (1) Skip section navigation (2)

Autocommit off and transaction isolation level

From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Autocommit off and transaction isolation level
Date: 2003-01-02 12:29:07
Message-ID: 007e01c2b25a$9858c370$0a1afea9@beeblebrox (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Hi all,

I have come across some weird behavior in postgres concerning autocommit=off
and setting the transaction isolation level. I have no explanation why
things should work as they do, so I consider this a bug, no?

With autocommit=on and normal begin; ... commit; block setting the
transaction isolation level works fine:

billing=# begin;
BEGIN
billing=# set transaction isolation level serializable;
SET
billing=# show transaction isolation level;
 TRANSACTION ISOLATION LEVEL
-----------------------------
 SERIALIZABLE
(1 row)

billing=# commit;
COMMIT


Now setting autocommit=off the set transaction isolation level command does
not show any effect:

billing=# set autocommit to off;
SET
billing=# set transaction isolation level serializable;
SET
billing=# select current_date;
    date
------------
 2003-01-02
(1 row)

billing=# show transaction isolation level;
 TRANSACTION ISOLATION LEVEL
-----------------------------
 READ COMMITTED    <---- this should be SERIALIZABLE, no??
(1 row)

billing=# commit;
COMMIT

Is it a bug?
Regards,
Michael Paesold


In response to

Responses

pgsql-hackers by date

Next:From: Dan LangilleDate: 2003-01-02 12:52:13
Subject: Re: PostgreSQL Password Cracker
Previous:From: Manfred KoizarDate: 2003-01-02 10:52:32
Subject: Re: pg_dump.options.diff

pgsql-patches by date

Next:From: Tom LaneDate: 2003-01-02 14:29:39
Subject: Re: pg_dump.options.diff
Previous:From: Manfred KoizarDate: 2003-01-02 10:52:32
Subject: Re: pg_dump.options.diff

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group