On Mon, Jan 27, 2014 at 10:58 AM, Heikki Linnakangas <hlinnakan...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers