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

Re: debuging postgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: debuging postgres
Date: 2004-08-24 16:42:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
> Christopher Kings-Lynne wrote:
>> ./configure --enable-debug

> Is this enough? I'm seeing that with --enable-debug only the
> option -g is passed to the compiler and the option -O2 is
> still there, is it not better compile with -O0 if you are
> going to debug it?

If you want to single-step through the code a lot, then -O0 is good.
But are you really gonna do that so much?  I do most of my tracing
at the level of function calls.

I tend to use -O1 as a compromise setting --- the code isn't totally
scrambled but it doesn't run like a dog either.  (Also, for development
purposes, -O0 is evil because it disables certain useful warnings in

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2004-08-24 17:20:34
Subject: Re: 8.0 beta 1 on linux-mipsel R5900
Previous:From: Neil ConwayDate: 2004-08-24 16:16:24
Subject: Re: 8.0 beta 1 on linux-mipsel R5900

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