Re: PostgreSQL stops when adding a breakpoint in CLion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL stops when adding a breakpoint in CLion
Дата
Msg-id 3912337.1641247363@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PostgreSQL stops when adding a breakpoint in CLion  (Stanislav Bashkyrtsev <stanislav.bashkirtsev@gmail.com>)
Ответы Re: PostgreSQL stops when adding a breakpoint in CLion  (Stanislav Bashkyrtsev <stanislav.bashkirtsev@gmail.com>)
Список pgsql-hackers
Stanislav Bashkyrtsev <stanislav.bashkirtsev@gmail.com> writes:
>> Why do you think postgres quits?

> The process was running and then it stopped. And in the console I see:
> 2022-01-03 23:23:29.495 MSK [76717] LOG:  checkpoint starting: shutdown
> immediate

In a standalone backend, I think there are only 3 ways to get to
normal shutdown:
    * SIGTERM
    * SIGQUIT
    * EOF on stdin

It's not very clear which of those your setup is triggering.

In any case, debugging standalone mode is very very rarely
what you should be doing; it's only vaguely related to normal
operation, plus you lack all the creature comforts of psql.
The usual thing is to start a normal interactive session, find out
the PID of its connected backend process ("select pg_backend_pid()"
is a reliable way), and then attach to that process with GDB or your
debugger of choice.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Proposal: remove obsolete hot-standby testing infrastructure
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: CREATEROLE and role ownership hierarchies