From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Radosław Smogura <rsmogura(at)softperience(dot)eu> |
Cc: | PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch - Debug builds without optimization |
Date: | 2011-06-16 15:54:40 |
Message-ID: | 1308239462-sup-1118@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Excerpts from Radosław Smogura's message of jue jun 16 08:30:27 -0400 2011:
> Hello,
>
> I'm sending following patch which disables optimization when
> --enable-debug is passed. It was nasty (for me, at least) that debug
> build required passing of CFLAGS with -O0 to get nice traceable code.
I disagree with this change. Debug builds are very useful to have in
production, and you don't want to be running -O0 there. I have found
that you can use a src/Makefile.custom like this for those times when you
want to debug stuff in a particular set of files:
CFLAGS := $(patsubst -O2,-O0,$(CFLAGS))
Then you remove the .o files that you want to debug, and rerun make.
This places the burden on the developer wanting to mess with random code
changes. Of course, this means that production builds are not as
debuggable, but IME it's much less of a problem there.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2011-06-16 15:56:44 | Re: Latch implementation that wakes on postmaster death on both win32 and Unix |
Previous Message | Simon Riggs | 2011-06-16 15:53:41 | Re: On-the-fly index tuple deletion vs. hot_standby |