Re: Printing backtrace of postgres processes
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, Robert Haas <robertmhaas@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>,
Craig Ringer <craig.ringer@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-17T14:42:44Z
Lists: pgsql-hackers
Attachments
- v14-0001-Add-function-to-log-the-backtrace-of-the-specifi.patch (text/x-patch) patch v14-0001
- v14-0002-pg_log_backtrace-support-for-logging-backtrace-o.patch (text/x-patch) patch v14-0002
On Tue, Nov 16, 2021 at 1:12 AM Justin Pryzby <pryzby@telsasoft.com> wrote: > > On Mon, Nov 15, 2021 at 09:12:49PM +0530, vignesh C wrote: > > The idea here is to implement & expose pg_print_backtrace function, internally > > This patch is closely related to this one > https://commitfest.postgresql.org/35/3142/ > | Logging plan of the currently running query > > I suggest to review that patch and make sure there's nothing you could borrow. I had a look and felt the attached patch is in similar lines > My only comment for now is that maybe the function name should be > pg_log_backtrace() rather than pg_print_backtrace(), since it doesn't actually > "print" the backtrace, but rather request the other backend to log its > backtrace. Modified > Did you see that the windows build failed ? > https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.153557 > I think you'll need to create an "alternate" output like > src/test/regress/expected/misc_functions_1.out > > It's possible that's best done by creating a totally new .sql and .out files > added to src/test/regress/parallel_schedule - because otherwise, you'd have to > duplicate the existing 300 lines of misc_fuctions.out. Modified Attached v14 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