debugging libpq backend code

From: mahendrakar s <mahendrakarforpg(at)gmail(dot)com>
To: pgsql-novice <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: debugging libpq backend code
Date: 2022-11-05 18:10:38
Message-ID: CABkiuWrTvNTega8aCb3Dak0wbTTySb_SQ=xTvdwwoO2Gu0qXyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello All,

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? how do I get the backend process id? Please note that
ps -ef does not show backend process and also I can't run `select
pg_backend_pid()` as connection is not authorized yet.

Can you suggest how to debug this backend code? especially files:
auth.c, auth-sasl.c in directory src/backend/libpq).

Appreciate your help.

Thanks,
Mahendrakar.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2022-11-05 19:39:39 Re: debugging libpq backend code
Previous Message Ankit Pandey 2022-11-02 11:48:42 Re: newbie pointers for development