Re: Printing backtrace of postgres processes

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Printing backtrace of postgres processes
Date: 2021-05-06 02:13:24
Message-ID: 20210506021324.GD27406@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here's a cleaned-up copy of the doc text.

Send a request to the backend with the specified process ID to log its backtrace.
The backtrace will be logged at message level <literal>LOG</literal>.
It will appear in the server log based on the log configuration set
(See <xref linkend="runtime-config-logging"/> for more information),
but will not be sent to the client regardless of
<xref linkend="guc-client-min-messages"/>.
A backtrace will identify where exactly the backend process is currently
executing. This may be useful to developers to diagnose stuck
processes and other problems. This feature is
not supported for the postmaster, logger, or statistics collector process. This
feature will be available if PostgreSQL was built
with the ability to capture backtracee. If not available, the function will
return false and show a WARNING.
Only superusers can request backends to log their backtrace.

> - * this and related functions are not inlined.
> + * this and related functions are not inlined. If edata pointer is valid
> + * backtrace information will set in edata.

will *be* set

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2021-05-06 02:42:27 Re: pg_receivewal makes a bad daemon
Previous Message Hannu Krosing 2021-05-06 01:32:28 Re: MaxOffsetNumber for Table AMs