How to Run postgres inside gdb for debugging - Mailing list pgsql-general

From Lee Kindness
Subject How to Run postgres inside gdb for debugging
Date
Msg-id 15478.21106.606877.673112@kelvin.csl.co.uk
Whole thread Raw
In response to How to Run postgres inside gdb for debugging  ("Amit Khare" <khare@uiuc.edu>)
Responses Re: How to Run postgres inside gdb for debugging  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Amit Khare writes:
 > Can any one help me running postgres inside gdb for debugging ?

The short answer is you need to tell gdb to connect to the backend
'postmaster' process which has been started for your connection - you
should able to work out its pid using ps (or more likely a simple list
in your debugger frontend).

The problem is you'll need to do this very fast - this is why postgres
has a '-W' option to tell the process to wait a defined time before
really starting up - giving you time to connect. See:

 http://www.geocrawler.com/archives/3/10/1999/4/0/1649841/

Lee.

pgsql-general by date:

Previous
From: Alexander Pucher
Date:
Subject: Re: Select <-> Case Insensitive
Next
From: Jean-Michel POURE
Date:
Subject: UTF-8 lenght of a string