Re: RFC: Making TRUNCATE more "MVCC-safe"
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Marti Raudsepp <marti@juffo.org>
Cc: Noah Misch <noah@leadboat.com>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-04T16:39:58Z
Lists: pgsql-hackers
Attachments
- strictmvcc.v1.patch (text/x-diff) patch v1
On Sun, Mar 4, 2012 at 1:02 PM, Simon Riggs <simon@2ndquadrant.com> wrote: > On Sun, Mar 4, 2012 at 9:59 AM, Simon Riggs <simon@2ndquadrant.com> wrote: >> On Sun, Mar 4, 2012 at 2:28 AM, Marti Raudsepp <marti@juffo.org> wrote: >>> On Sat, Mar 3, 2012 at 14:53, Simon Riggs <simon@2ndquadrant.com> wrote: >>>> Thanks Noah for drawing attention to this thread. I hadn't been >>>> watching. As you say, this work would allow me to freeze rows at load >>>> time and avoid the overhead of hint bit setting, which avoids >>>> performance issues from hint bit setting in checksum patch. >>>> >>>> I've reviewed this patch and it seems OK to me. Good work Marti. > > ... > >> v3 attached. > > More detailed thoughts show that the test in heap_beginscan_internal() > is not right enough, i.e. wrong. > > We need a specific XidInMVCCSnapshot test on the relvalidxid, so it > needs to be a specific xid, not an xmin because otherwise we can get > concurrent transactions failing, not just older transactions. Marti, please review this latest version which has new isolation tests added. This does both TRUNCATE and CREATE TABLE. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services