Re: Read Uncommitted

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Read Uncommitted
Date: 2008-05-26 00:49:11
Message-ID: 1211762951.4489.74.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Sun, 2008-05-25 at 20:10 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > At the moment, a long running SQL Statement can prevent xmin moving
> > forward, which can result in VACUUM and HOT not being able to remove row
> > versions effectively. My proposal is that a Read Uncommitted transaction
> > would not prevent row removal, which then offers no guarantee that the
> > "correct" answer would be returned. Which is *exactly* what that
> > transaction isolation level was designed for.
>
> This seems like a remarkably bad idea. It has no use that I can see for
> anything except shooting oneself in the foot.
>
> > The implementation is trivial, namely that the calculation of global
> > xmin would ignore Read Uncommitted transactions.
>
> This proposed implementation seems to have very little to do with
> what most people would think Read Uncommitted does. In particular it
> does not agree with the SQL spec,
> ...(snip)...
>
> Even if we thought that supporting Read Uncommitted would be a good
> idea, this would be an unacceptably unstable implementation of it.

Well, the thought of an unstable "dirty read" seems strange, but I get
your point that it isn't the SQL Standard's Read Uncommitted mode.

The use of this is clear though: allowing long running transactions
against unchanging data to not interfere with other activities. It will
also have importance in a Hot Standby mode.

So, even if this isn't Read Uncommitted exactly, it is a transaction
isolation mode that has utility for us and I would like to support it,
well documented and with appropriate cautions.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas H. 2008-05-26 04:54:30 Re: BUG #4186: set lc_messages does not work
Previous Message Florian Pflug 2008-05-26 00:19:36 Re: idea: storing view source in system catalogs