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

Re: Stupid question on Read Committed Isolation Level

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Stupid question on Read Committed Isolation Level
Date: 2004-01-29 18:07:25
Message-ID: 20040129140241.C6922@ganymede.hub.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, 29 Jan 2004, Jeroen T. Vermeulen wrote:

> On Thu, Jan 29, 2004 at 01:33:48PM -0400, Marc G. Fournier wrote:
>
> > What happens if I abort on the first transaction?  If I'm reading this
>
> Doesn't matter, because your second transaction doesn't read any of the
> changes you're making there--until (and if) that first one commits.  The
> second transaction simply doesn't care if the the first has been aborted
> or is still running.  It would if the transaction level were READ
> UNCOMMITTED, but with postgres we don't need to worry about that.

Wait, did you read what I had originally posted?  According to the docs
for what I read:

"If two such transactions concurrently try to change the balance of
account 12345, we clearly want the second transaction to start from the
updated version of the account's row"

To me, I read this as the first transaction has not yet committed, but the
second sees its changes ... so if second commitst, and first hasn't yet,
second commits with seconds changes + firsts changes, but what if first
aborts?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org           Yahoo!: yscrappy              ICQ: 7615664

In response to

Responses

pgsql-hackers by date

Next:From: Marc G. FournierDate: 2004-01-29 18:09:07
Subject: Re: Stupid question on Read Committed Isolation Level
Previous:From: Tom LaneDate: 2004-01-29 18:06:59
Subject: Re: Stupid question on Read Committed Isolation Level

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