Re: [HACKERS] Date/time on glibc2 linux

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: phd(at)sun(dot)med(dot)ru
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Date/time on glibc2 linux
Date: 1998-12-08 14:21:32
Message-ID: 366D35EC.20CE4E6@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1998-12-08 14:58:46 Re: [INTERFACES] Re: libpgtcl.dll for Windows
Previous Message Oleg Broytmann 1998-12-08 12:59:33 Re: [HACKERS] Date/time on glibc2 linux