Re: Failure while inserting parent tuple to B-tree is not fun - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Failure while inserting parent tuple to B-tree is not fun
Date
Msg-id CAM3SWZT1DjNjK14GphpPiw1QSEq+WJBqParj9be=tA+A+LN4NQ@mail.gmail.com
Whole thread Raw
In response to Re: Failure while inserting parent tuple to B-tree is not fun  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On Mon, Jan 27, 2014 at 10:58 AM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:
> Okay, promise not to laugh. I did write a bunch of hacks, to generate
> graphviz .dot files from the btree pages, and render them into pictures. It
> consist of multiple parts, all in the attached tarball.

It's funny that you should say that, because I was thinking about
building something similar over the past few days. I find it very
useful to build ad-hoc tools like that, and I thought that it would be
particularly useful to have something visual for testing btree code.
Sure, you can come up with a test and keep the details straight in
your head while coordinating everything, but that won't scale as new
testing scenarios inevitably occur to you. I've done plenty of things
with contrib/pageinspect along these lines in the past, but this is
better. Anything that reduces the friction involved in building an
accurate mental model of things is a very good thing.



-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: PoC: Partial sort
Next
From: Robert Haas
Date:
Subject: Re: ALTER TABLE lock strength reduction patch is unsafe