public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: mahendrakar s <[email protected]>
Cc: pgsql-novice <[email protected]>
Subject: Re: debugging libpq backend code
Date: Sat, 05 Nov 2022 15:39:39 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CABkiuWrTvNTega8aCb3Dak0wbTTySb_SQ=xTvdwwoO2Gu0qXyg@mail.gmail.com>
References: <CABkiuWrTvNTega8aCb3Dak0wbTTySb_SQ=xTvdwwoO2Gu0qXyg@mail.gmail.com>
mahendrakar s <[email protected]> writes:
> I'm trying to debug libpq backend code (files: auth.c, auth-sasl.c in
> directory src/backend/libpq).
> I followed: Developer FAQ - PostgreSQL wiki and attached postgres
> process ( because connection is still in progress and I don't see
> backend process yet when I try to connect through psql). I could set
> the break-points but these are not hit while it must. I think I should
> not be attaching postmaster parent process instead attach the backend
> process but how?
The traditional answer is to set pre_auth_delay high enough to give
yourself time to identify the new backend process (via "ps") and
attach to it in gdb.
You might also be able to attach to the postmaster in gdb and
persuade it to follow the fork(), but I'm not very sure about
the details of making that work while not complicating your
life with a bunch of other postmaster children.
regards, tom lane
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: debugging libpq backend code
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox