Re: RFC: Making TRUNCATE more "MVCC-safe"

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RFC: Making TRUNCATE more "MVCC-safe"
Date: 2012-03-05 20:53:54
Message-ID: CA+U5nM+1nZaJZ7x86-woVvtbn2JGqYqGtFC=-fpgtHk3V715iw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 5, 2012 at 8:46 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

>> In any event, I think a pg_class.relvalidxmin is the right starting point.
>> One might imagine a family of relvalidxmin, convalidxmin, indcheckxmin
>> (already exists), inhvalidxmin, and attvalidxmin.  relvalidxmin is like the
>> AccessExclusiveLock of that family; it necessarily blocks everything that
>> might impugn the others.  The value in extending this to more catalogs is the
>> ability to narrow the impact of failing the check.  A failed indcheckxmin
>> comparison merely excludes plans involving the index.  A failed inhvalidxmin
>> check might just skip recursion to the table in question.  Those are further
>> refinements, much like using weaker heavyweight lock types.
>
> Yes, good parallel.

Did you guys get my comment about not being able to use an xmin value,
we have to use an xid value and to a an XidInMVCCSnapshot() test? Just
checking whether you agree/disagree.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Artur Litwinowicz 2012-03-05 20:59:58 Re: elegant and effective way for running jobs inside a database
Previous Message Robert Haas 2012-03-05 20:46:16 Re: RFC: Making TRUNCATE more "MVCC-safe"