Re: Printing backtrace of postgres processes
Maciek Sakrejda <m.sakrejda@gmail.com>
From: Maciek Sakrejda <m.sakrejda@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: vigneshwaran C <vignesh21@gmail.com>,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: 2024-01-14T23:20:48Z
Lists: pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world: tested, failed
Implements feature: tested, passed
Spec compliant: not tested
Documentation: tested, passed
I'm not sure if this actually still needs review, but it's marked as such in the CF app, so I'm reviewing it in the hopes of moving it along.
The feature works as documented. The docs say "This function is supported only if PostgreSQL was built with the ability to capture backtraces, otherwise it will emit a warning." I'm not sure what building with the ability to capture backtraces is, but it worked with no special config on my machine. I don't have much C experience, so I don't know if this is something that should have more context in a README somewhere, or if it's likely someone who's interested in this will already know what to do. The code looks fine to me.
I tried running make installcheck-world, but it failed on 17 tests. However, master also fails here on 17 tests. A normal make check-world passes on both branches. I assume I'm doing something wrong and would appreciate any pointers [0].
Based on my review and Daniel's comment above, I'm marking this as Ready for Committer.
Thanks,
Maciek
[0] My regression.diffs has errors like
```
diff -U3 /home/maciek/code/aux/postgres/src/test/regress/expected/copyselect.out /home/maciek/code/aux/postgres/src/test/regress/results/copyselect.out
--- /home/maciek/code/aux/postgres/src/test/regress/expected/copyselect.out 2023-01-02 12:21:10.792646101 -0800
+++ /home/maciek/code/aux/postgres/src/test/regress/results/copyselect.out 2024-01-14 15:04:07.513887866 -0800
@@ -131,11 +131,6 @@
2
?column?
----------
- 3
-(1 row)
-
- ?column?
-----------
4
(1 row)
```
and
```
diff -U3 /home/maciek/code/aux/postgres/src/test/regress/expected/create_table.out /home/maciek/code/aux/postgres/src/test/regress/results/create_table.out
--- /home/maciek/code/aux/postgres/src/test/regress/expected/create_table.out 2023-10-02 22:14:02.583377845 -0700
+++ /home/maciek/code/aux/postgres/src/test/regress/results/create_table.out 2024-01-14 15:04:09.037890710 -0800
@@ -854,8 +854,6 @@
b | integer | | not null | 1 | plain | |
Partition of: parted FOR VALUES IN ('b')
Partition constraint: ((a IS NOT NULL) AND (a = 'b'::text))
-Not-null constraints:
- "part_b_b_not_null" NOT NULL "b" (local, inherited)
-- Both partition bound and partition key in describe output
\d+ part_c
```
I'm on Ubuntu 22.04 with Postgres 11, 12, 13, and 16 installed from PGDG.
The new status of this patch is: Ready for Committer
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