Re: Printing backtrace of postgres processes
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: vignesh C <vignesh21@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-12-01T04:01:25Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > It should be quite doable to emit such backtraces directly to stderr, > instead of using appendStringInfoString()/elog(). No, please no. (1) On lots of logging setups (think syslog), anything that goes to stderr is just going to wind up in the bit bucket. I realize that we have that issue already for memory context dumps on OOM errors, but that doesn't make it a good thing. (2) You couldn't really write "to stderr", only to fileno(stderr), creating issues about interleaving of the output with regular stderr output. For instance it's quite likely that the backtrace would appear before stderr output that had actually been emitted earlier, which'd be tremendously confusing. (3) This isn't going to do anything good for my concerns about interleaved output from different processes, either. regards, tom lane
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