Re: MVCC catalog access - Mailing list pgsql-hackers

From Greg Stark
Subject Re: MVCC catalog access
Date
Msg-id CAM-w4HP1Ppb18WkHzJSuCk=74QHSO1PnV3khkY0aWvYhnv_bVQ@mail.gmail.com
Whole thread Raw
In response to MVCC catalog access  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: MVCC catalog access  (Hannu Krosing <hannu@2ndQuadrant.com>)
Re: MVCC catalog access  (Andres Freund <andres@2ndquadrant.com>)
Re: MVCC catalog access  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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 was always under the impression that the problem was we weren't
quite sure what changes would be needed to make mvcc-snapshots work
for the catalog lookups. The semantics of SnapshotNow aren't terribly
clear either but we have years of experience telling us they seem to
basically work. Most of the problems we've run into we either have
worked around in the catalog accesses. Nobody really knows how many of
the call sites will need different logic to behave properly with mvcc
snapshots.

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. If you clean those all up it will be probably be cleaner and
better but we don't know how many such sites will need to be modified.
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?

-- 
greg



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Time for beta2 ?
Next
From: Greg Stark
Date:
Subject: Re: Vacuum, Freeze and Analyze: the big picture