Re: Are long term never commited SELECT statements are a problem?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Erik Wasser <erik(dot)wasser(at)iquer(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Are long term never commited SELECT statements are a problem?
Date: 2005-07-21 16:23:03
Message-ID: 20050721162303.GA28287@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jul 21, 2005 at 05:40:57PM +0200, Erik Wasser wrote:
> Why do I see in the first transaction data from the commited second
> transaction? Doesn't prove that the documentation on the above URL
> wrong?

No, it doesn't. The quote you posted refers to the SERIALIZABLE
isolation level, but the default is READ COMMITTED. Unless you've
changed the default (and it appears that you haven't), then
transactions that don't set an isolation level will default to READ
COMMITTED.

The following command shows what isolation level the current
transaction is using:

SHOW transaction_isolation;

Try your example again, but issue the following command in transaction 1
before doing anything else:

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jamie Lawrence 2005-07-21 18:32:24 Different encodings in different DBs in same cluster
Previous Message Alvaro Herrera 2005-07-21 16:13:34 Re: Are long term never commited SELECT statements are a problem?