How to Run postgres inside gdb for debugging

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: "Amit Khare" <khare(at)uiuc(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: How to Run postgres inside gdb for debugging
Date: 2002-02-22 14:15:14
Message-ID: 15478.21106.606877.673112@kelvin.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel POURE 2002-02-22 14:38:54 UTF-8 lenght of a string
Previous Message Alexander Pucher 2002-02-22 14:08:54 Re: Select <-> Case Insensitive