Skip site navigation (1) Skip section navigation (2)

Re: debugging tools inside postgres

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: HuangQi <huangqiyx(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: debugging tools inside postgres
Date: 2011-06-25 09:05:30
Message-ID: 20110625090530.GB20648@svana.org (view raw or flat)
Thread:
Lists: 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(at)svana(dot)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

In response to

pgsql-hackers by date

Next:From: Jeff DavisDate: 2011-06-25 10:24:45
Subject: Re: heap_hot_search_buffer refactoring
Previous:From: Alexander KorotkovDate: 2011-06-25 08:23:13
Subject: Re: WIP: Fast GiST index build

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group