Re: Strange situation with two tables.

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
Cc: Terry Yapt <yapt(at)technovell(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Strange situation with two tables.
Date: 2002-09-11 14:47:21
Message-ID: 1031755641.2064.415.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 2002-09-11 at 15:20, Henshall, Stuart - WCP wrote:
...
> > BEGIN...END) None of the results of the transaction will be
> > visible to
> > other connections until the transaction is committed.
> >
> >
> I thought that was only the case when the transaction level was SERIALIZABLE
> I believe pg starts in READ COMMITED transaction level.
> http://www.postgresql.org/idocs/index.php?transaction-iso.html

To be sure, I just tested by explicitly setting the isolation level to
read committed and to serializable. As I expected, an uncompleted
transaction is indeed invisible to other connections, whichever
isolation level is chosen.

In terms of the documentation page you referred to, reading uncommitted
rows is a "dirty read". This is only possible at isolation level 'read
uncommitted', which PostgreSQL does not support.

You may be referring to phantom reads; these could be avoided, if they
are a problem, by explicitly setting the transaction isolation level to
serializable.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"I am crucified with Christ; nevertheless I live; yet
not I, but Christ liveth in me; and the life which I
now live in the flesh I live by the faith of the Son
of God, who loved me, and gave himself for me."
Galatians 2:20

Browse pgsql-novice by date

  From Date Subject
Next Message Oliver Elphick 2002-09-11 15:09:07 Re: Strange situation with two tables.
Previous Message Terry Yapt 2002-09-11 14:41:42 Re: Strange situation with two tables.