Re: Printing backtrace of postgres processes

Поиск
Список
Период
Сортировка
От vignesh C
Тема Re: Printing backtrace of postgres processes
Дата
Msg-id CALDaNm25WjkMhowSbPqyouuSV0z-WjEtJw_R7On4_a3-SHF=RQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Printing backtrace of postgres processes  (bt21tanigaway <bt21tanigaway@oss.nttdata.com>)
Список pgsql-hackers
On Tue, Oct 12, 2021 at 10:47 AM bt21tanigaway
<bt21tanigaway@oss.nttdata.com> wrote:
>
> Hi,
>
> > The previous patch was failing because of the recent test changes made
> > by commit 201a76183e2 which unified new and get_new_node, attached
> > patch has the changes to handle the changes accordingly.
> > Thanks for your update!
> > I have two comments.
>
> 1.Do we need “set_backtrace(NULL, 0);” on “HandleMainLoopInterrupts()”?
> I could observe that it works correctly without this. It is written on
> “HandleAutoVacLauncherInterrupts” as well, but I think it is necessary
> to prevent delays as well as [1].

I have removed this from HandleMainLoopInterrupts

> 2.The patch seems to forget to handle
> “ereport(LOG,(errmsg("logging backtrace of PID %d", MyProcPid)));” on
> “HandleAutoVacLauncherInterrupts” and “HandleMainLoopInterrupts()”.
> I think it should be the same as the process on “ProcessInterrupts()”.

I have create ProcessPrintBacktraceInterrupt which has the
implementation and is called wherever required. It is handled now.

> 3.How about creating a new function.
> Since the same process is on three functions( “ProcessInterrupts()”,
> “HandleAutoVacLauncherInterrupts”, “HandleMainLoopInterrupts()” ), I
> think it’s good to create a new function.

I have created ProcessPrintBacktraceInterrupt to handle it.

Thanks for the comments, v9 patch attached at [1] has the changes for the same.
[1] - https://www.postgresql.org/message-id/CALDaNm3MGVP_WK1Uuf%3DBiAJ9PeVOfciwLy0mrFA1JNbRp99VOQ%40mail.gmail.com

Regards,
Vignesh



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Commitfest 2021-11 Patch Triage - Part 2