Re: MVCC catalog access - Mailing list pgsql-hackers

From Andres Freund
Subject Re: MVCC catalog access
Date
Msg-id 20130605150739.GE28067@alap2.anarazel.de
Whole thread Raw
In response to Re: MVCC catalog access  (Greg Stark <stark@mit.edu>)
Responses Re: MVCC catalog access
List pgsql-hackers
On 2013-06-05 15:28:09 +0100, Greg Stark wrote:
> On Wed, May 22, 2013 at 3:18 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> > We've had a number of discussions about the evils of SnapshotNow.  As
> > far as I can tell, nobody likes it and everybody wants it gone, but
> > there is concern about the performance impact.
> I thought there were many call sites that were specifically depending
> on seeing dirty reads to avoid race conditions with other backends --
> which probably just narrowed the race condition or created different
> ones.

But SnapshotNow doesn't allow you to do actual dirty reads? It only
gives you rows back that were actually visible when we checked. The
difference to SnapshotMVCC is that during a scan the picture of which
transactions are committed can change.

> I'm not even sure what "clean them up" means. You can replace checks
> with things like constraints and locks but the implementation of
> constraints and locks will still need to use SnapshotNow surely?

The places that require this should already use HeapTupleSatisfiesDirty
which is something different.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: extensible external toast tuple support & snappy prototype
Next
From: Kevin Grittner
Date:
Subject: EXPLAIN (ANALYZE) broken