Re: Printing backtrace of postgres processes
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.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>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-06T14:53:42Z
Lists: pgsql-hackers
Attachments
- v8-0001-Print-backtrace-of-specified-postgres-process.patch (text/x-patch) patch v8-0001
On Thu, May 6, 2021 at 7:43 AM Justin Pryzby <pryzby@telsasoft.com> wrote: > > 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. Thanks for rephrasing, I have modified to include checkpointer, walwriter and background writer process also. > > - * 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 Modified. Thanks for the comments, Attached v8 patch has the fixes for the same. Regards, Vignesh
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