Re: RFC: Making TRUNCATE more "MVCC-safe" - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: RFC: Making TRUNCATE more "MVCC-safe"
Date
Msg-id CA+U5nM+1nZaJZ7x86-woVvtbn2JGqYqGtFC=-fpgtHk3V715iw@mail.gmail.com
Whole thread Raw
In response to Re: RFC: Making TRUNCATE more "MVCC-safe"  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, Mar 5, 2012 at 8:46 PM, Robert Haas <robertmhaas@gmail.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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: RFC: Making TRUNCATE more "MVCC-safe"
Next
From: Artur Litwinowicz
Date:
Subject: Re: elegant and effective way for running jobs inside a database