Re: MVCC catalog access

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MVCC catalog access
Date: 2013-05-30 05:39:46
Message-ID: CAB7nPqT-+=xuchi-vzu39x9kGd5RoRT0eSb4JYKte-nqsdMT-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 28, 2013 at 10:39 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> IMHO, we should press forward with this approach. Considering that
> these are pretty extreme test cases, I'm inclined to view the
> performance loss as acceptable. We've never really viewed DDL as
> something that needs to be micro-optimized, and there is ample
> testimony to that fact in the existing code and in the treatment of
> prior patches in this area. This is not to say that we want to go
> around willy-nilly making it slower, but I think there will be very
> few users for which the number of microseconds it takes to create or
> drop an SQL object is performance-critical, especially when you
> consider that (1) the effect will be quite a bit less when the objects
> are tables, since in that case the snapshot cost will tend to be
> drowned out by the filesystem cost and (2) people who don't habitually
> keep hundreds and hundreds of connections open - which hopefully most
> people don't - won't see the effect anyway. Against that, this
> removes the single largest barrier to allowing more concurrent DDL, a
> feature that I suspect will make a whole lot of people *very* happy.

+1.
So, I imagine that the next step would be to add a new Snapshot validation
level in tqual.h. Something like SnapshotMVCC? Then replace SnapshotNow
by SnapshotMVCC where it is required.

I am also seeing that SnapshotNow is used in places where we might not want
to
have it changed. For example autovacuum code path when we retrieve database
or table list should not be changed, no?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-05-30 06:29:31 Re: all_visible replay aborting due to uninitialized pages
Previous Message Jeff Davis 2013-05-30 04:06:59 Re: removing PD_ALL_VISIBLE