Re: [HACKERS] Date/time on glibc2 linux - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Date/time on glibc2 linux
Date
Msg-id 366D35EC.20CE4E6@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] Date/time on glibc2 linux  (Oleg Broytmann <phd@sun.med.ru>)
Responses Re: [HACKERS] Date/time on glibc2 linux  (Oleg Broytmann <phd@sun.med.ru>)
List pgsql-hackers
> > To help look at the problem do a "make clean" in that directory, and
> > modify the Makefile to add to CFLAGS the argument "-DDATEDEBUG" 
> > which will enable some print statements.
>    Where do the output goes? To postmaster's stdout, I guess?

Yes. I always have X up on my systems, and for debugging usually run
postmaster from the command line on one terminal while running psql from
another.

Recently, Bruce et al got me going with gdb directly on the Postgres
backend, and that works very well also. You can do the following:

$ gdb postgres
<snip>
(gdb) b datetime_out
Breakpoint 1 at 0x80ec6bc
(gdb) run -d 99
<snip>
> select 'now'::datetime;
<snip>
Breakpoint 1, 0x80ec6bc in datetime_out ()
(gdb) 

and you can then step through from there. Note that you should recompile
with  CFLAGS+= -O0 -g
to allow the debugger to grok the source code.
                  - Tom


pgsql-hackers by date:

Previous
From: Oleg Broytmann
Date:
Subject: Re: [HACKERS] Date/time on glibc2 linux
Next
From: Oleg Bartunov
Date:
Subject: problem compiling with egcs 1.1.1