Re: debugging with gdb in postgres

From: Jim Mlodgenski <jimmy76(at)gmail(dot)com>
To: Ravi Kiran <ravi(dot)kolanpaka(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: debugging with gdb in postgres
Date: 2014-07-08 16:49:52
Message-ID: CAB_5SRfiS4t2B0czDt+PQZfD=j2FZecQNF0TnZXTVi=-aVEAuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 8, 2014 at 12:40 PM, Ravi Kiran <ravi(dot)kolanpaka(at)gmail(dot)com>
wrote:

> hi,
>
> I am trying to learn how postgresql implements the join algorithms.
>
> So I am trying to learn about the source code of the executor precisely
> the file nodenestloop.c .
>
> In the executor file I have nodenestloop.o but no binary executor file.
>
> I am using helios eclipse to edit the source code.
>
> I want to use gdb for debugging that file, but for that gdb needs a
> executor file.
>
> I want to Debug that file using gdb and attach the postgress process file.
>
> Could anyone help me with how to debug that file using gdb and attach a
> process, I know that we can find out about the pid of the process by using
> this command in psql, *select pg_backend_pid* , but how exactly are we
> going to give this pid to gdb.
>

The wiki page may help
https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD

> any help or related links wwould be grateful.
>
> Thank you
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kynn Jones 2014-07-08 19:04:45 Re: Random-looking primary keys in the range 100000..999999
Previous Message Ravi Kiran 2014-07-08 16:40:57 debugging with gdb in postgres