Re: Prepared transactions vs novice DBAs, again - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Prepared transactions vs novice DBAs, again
Date
Msg-id 13294.1240455881@sss.pgh.pa.us
Whole thread Raw
In response to Re: Prepared transactions vs novice DBAs, again  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Maybe I'm just dumb, but I don't get it.  If I start a transaction and
> do "SELECT * FROM foo" and then wait around for an hour or two while
> someone else makes changes to foo and then do "SELECT * FROM foo"
> again, I expect to see the same rows I saw the first time, which means
> they still need to be around.

That only happens in a serializable transaction, ie, one that took
*and kept* a snapshot at transaction start.  In READ COMMITTED mode
we drop all snaps between statements, so there is nothing stopping
reclaiming of rows that were visible to prior statements.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 8.4b1 regression?
Next
From: Fujii Masao
Date:
Subject: Re: The last WAL segment of the old timeline is not archived for a while after archive recovery