Re: Debugging Postgresql 9.3 with Eclipse CDT and GDB - Mailing list pgsql-novice

From Tom Lane
Subject Re: Debugging Postgresql 9.3 with Eclipse CDT and GDB
Date
Msg-id 30771.1439992007@sss.pgh.pa.us
Whole thread Raw
In response to Debugging Postgresql 9.3 with Eclipse CDT and GDB  (venkateshwaran S <venkateshwaracholan@gmail.com>)
List pgsql-novice
venkateshwaran S <venkateshwaracholan@gmail.com> writes:
> i have installed postgresql 9.3 as stated in this link:
> https://wiki.postgresql.org/wiki/Working_with_Eclipse
> The debugger works fine for the server(which waits and accepts incoming
> client connections).
> 1. When i connect a client with: **$ psql test** .Does the server create a
> new thread for the client?

It creates a new child process.  Read
http://www.postgresql.org/docs/devel/static/overview.html
particularly section 48.2.

> 2. Is it possible to attach debugger and set breakpoints in parser.c or
> executor.c in postgresql source files so that i can analyse how postgresql
> queries are executed?

It sounds like you're setting breakpoints in the postmaster process,
which will never be hit.  Attach to the relevant backend process instead.
(Select pg_backend_pid() in your client if you're not sure which that is,
or you can discover it from "ps auxww" output.)

            regards, tom lane


pgsql-novice by date:

Previous
From: Hans Ginzel
Date:
Subject: postgres_fdw connection string
Next
From: Freeda Suing
Date:
Subject: Importing dump file from MS SQL to PSQL 9.3