I tired but it breaks in the Postmaster and not in the backend process that
is created for each process.

	-----Original Message-----
	From:	Theo Kramer [SMTP:theo@flame.co.za]
	Sent:	Wednesday, April 28, 1999 2:08 PM
	To:	pgsql-hackers@postgreSQL.org
	Subject:	Re: [HACKERS]  How do I get the backend server into
gdb?

	Bruce Momjian wrote:
	> 
	> There is some option that starts backends, and then sleeps 
	> waiting for a
	> gdb connection, or something like that.
	> 

	Why not just the following

	gdb postmaster

	Set one ore more breakpoints where you think the problem 
	might be, then type 'run'.

	Start the client and with a bit of luck gdb will break at
	the breakpoint set.

	You may need to do this a couple of times until you
	have found the right area in the code.
	--------
	Regards
	Theo

Wed, 28 Apr 1999 15:34:34 -0500
Michael J Davis <michael.j.davis@tvguide.com>
RE: [HACKERS]  How do I get the backend server into gdb?

On 28-Apr-99 Michael J Davis wrote:
> I tired but it breaks in the Postmaster and not in the backend process that
> is created for each process.

Have you tried starting the postmaster in debug mode?   From man postmaster:

       -d [debug_level]
            The  optional  argument  debug_level  determines  the
            amount of debugging output the backend  servers  will
            produce.   If debug_level is one, the postmaster will
            trace all connection traffic, and nothing else.   For
            levels  two and higher, debugging is turned on in the
            backend process  and  the  postmaster  displays  more
            information,  including  the  backend environment and
            process traffic.  Note that if no file  is  specified
            for  backend  servers  to send their debugging output
            then this output will appear on the  controlling  tty
            of their parent postmaster.

There other debugging comments in this man page so you may wanna look
at it first.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================



Wed, 28 Apr 1999 17:05:05 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
RE: [HACKERS]  How do I get the backend server into gdb?
See tcop/postgres.c.


> I tired but it breaks in the Postmaster and not in the backend process that
> is created for each process.
> 
> 	-----Original Message-----
> 	From:	Theo Kramer [SMTP:theo@flame.co.za]
> 	Sent:	Wednesday, April 28, 1999 2:08 PM
> 	To:	pgsql-hackers@postgreSQL.org
> 	Subject:	Re: [HACKERS]  How do I get the backend server into
> gdb?
> 
> 	Bruce Momjian wrote:
> 	> 
> 	> There is some option that starts backends, and then sleeps 
> 	> waiting for a
> 	> gdb connection, or something like that.
> 	> 
> 
> 	Why not just the following
> 
> 	gdb postmaster
> 
> 	Set one ore more breakpoints where you think the problem 
> 	might be, then type 'run'.
> 
> 	Start the client and with a bit of luck gdb will break at
> 	the breakpoint set.
> 
> 	You may need to do this a couple of times until you
> 	have found the right area in the code.
> 	--------
> 	Regards
> 	Theo
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 28 Apr 1999 17:55:54 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS]  How do I get the backend server into gdb?