Re: RFC: Making TRUNCATE more "MVCC-safe"
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Noah Misch <noah@leadboat.com>, Marti Raudsepp <marti@juffo.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-05T20:53:54Z
Lists: 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