Re: Printing backtrace of postgres processes

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Printing backtrace of postgres processes
Дата
Msg-id 20210127170958.vzo33jzmqwhmn7z6@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Printing backtrace of postgres processes  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Printing backtrace of postgres processes  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
Hi,

On 2021-01-27 19:05:16 +0530, vignesh C wrote:

>  /*
> + * LogBackTrace
> + *
> + * Get the backtrace and log the backtrace to log file.
> + */
> +void
> +LogBackTrace(void)
> +{
> +    int            save_errno = errno;
> +
> +    void       *buf[100];
> +    int            nframes;
> +    char      **strfrms;
> +    StringInfoData errtrace;
> +
> +    /* OK to process messages.  Reset the flag saying there are more to do. */
> +    PrintBacktracePending = false;

ISTM that it'd be better to do this in the caller, allowing this
function to be used outside of signal triggered backtraces.

>  
> +extern void LogBackTrace(void); /* Called from EmitProcSignalPrintCallStack */

I don't think this comment is correct anymore?

Greetings,

Andres Freund



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

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Improve join selectivity estimation using extended statistics
Следующее
От: Robert Haas
Дата:
Сообщение: Re: cleaning up a few CLOG-related things