Re: debugging libpq backend code

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: debugging libpq backend code
Дата
Msg-id 2732738.1667677179@sss.pgh.pa.us
обсуждение исходный текст
Ответ на debugging libpq backend code  (mahendrakar s <mahendrakarforpg@gmail.com>)
Список pgsql-novice
mahendrakar s <mahendrakarforpg@gmail.com> 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



В списке pgsql-novice по дате отправления:

Предыдущее
От: mahendrakar s
Дата:
Сообщение: debugging libpq backend code
Следующее
От: Ankit Kumar Pandey
Дата:
Сообщение: Todo item: distinct clause - guidance