Re: Printing backtrace of postgres processes
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Craig Ringer <craig.ringer@enterprisedb.com>, Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, pgsql-hackers@lists.postgresql.org
Date: 2021-05-06T02:13:24Z
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
Commits
-
Perform apply of large transactions by parallel workers.
- 216a784829c2 16.0 cited
-
Enhance pg_log_backend_memory_contexts() for auxiliary processes.
- 790fbda90209 15.0 cited
-
Allow GRANT on pg_log_backend_memory_contexts().
- f0b051e322d5 15.0 cited
-
Move Perl test modules to a better namespace
- b3b4d8e68ae8 15.0 cited
-
Unify PostgresNode's new() and get_new_node() methods
- 201a76183e20 15.0 cited
-
Add backtrace support for error reporting
- 71a8a4f6e365 13.0 cited