Re: debugging tools inside postgres - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: debugging tools inside postgres
Date
Msg-id 20110625090530.GB20648@svana.org
Whole thread Raw
In response to debugging tools inside postgres  (HuangQi <huangqiyx@gmail.com>)
List pgsql-hackers
On Fri, Jun 24, 2011 at 02:35:08PM +0800, HuangQi wrote:
> Hi,
>    I'm trying to debug a modification for the query planner. But I found it
> seems the data structure of my planned query is incorrect. I was trying to
> print out the data structure by use the "p" command in gdb which is quite
> inconvenient and takes time. May I know is there any embedded function in
> postgres to print out the node data structures, or any other plan related
> data structures? Thanks.

I don't know if anyone has done it, but recent versions of gdb
apparenly can use python scripts, and use them to dump c++ library
structures in readable formats.  I guess someone could write some
script to make debugging postgresql nicer (pretty printing snapshots,
locks, etc).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patriotism is when love of your own people comes first; nationalism,
> when hate for people other than your own comes first.
>                                       - Charles de Gaulle

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: WIP: Fast GiST index build
Next
From: Jeff Davis
Date:
Subject: Re: heap_hot_search_buffer refactoring