Re: how to debug the codes in the PostgresMain() from the begining of this function to the "for (;;)" loop that handles the connection?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: sunpeng <bluevaley(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to debug the codes in the PostgresMain() from the begining of this function to the "for (;;)" loop that handles the connection?
Date: 2010-04-22 19:47:44
Message-ID: 20100422194744.GB3244@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

sunpeng escribió:
> how to debug the codes in the PostgresMain() from the begining of this
> function to the "for (;;)" loop that handles the connection?
> if i use eclipse cdt to attach the postgres process forked by postmaster,
> this part of codes from the begining of this PostgresMain() to the "for
> (;;)" loop could not be debugged. So anybody know how to debug this part
> codes? thanks.

Try using the -W option to postmaster. That makes the newly forked
process sleep for a while, giving you time to attach a debugger to it.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2010-04-22 19:55:11 Re: PSQL segmentation fault after setting host
Previous Message Morgan Taschuk 2010-04-22 19:06:37 Re: PSQL segmentation fault after setting host