Re: Patch - Debug builds without optimization - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch - Debug builds without optimization
Date
Msg-id 8632.1322604731@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch - Debug builds without optimization  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Patch - Debug builds without optimization
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On tis, 2011-11-29 at 16:32 -0500, Bruce Momjian wrote:
>> I have applied the attached patch to help make suggestsions for server
>> developers.  I didn't reproduce most of the text because it was already
>> listed with the options.  Let me know if you want additional text.

> Advising "server developers" to use CFLAGS="-O0 -g", without
> qualification, is dangerous, in my mind, because that loses a lot of
> compiler checks.  The only reason to use -O0 is when you really need to
> debug something in single steps and you can't make sense of it any other
> way.

Yes.  -O0 is really a pretty horrid default choice, and we should NOT be
recommending it, especially not with no discussion of the disadvantages.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Patch - Debug builds without optimization
Next
From: Ants Aasma
Date:
Subject: Re: Avoiding repeated snapshot computation