Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johto/call_graph
A PostgreSQL extension for automatically creating function call graphs
https://github.com/johto/call_graph
Last synced: about 9 hours ago
JSON representation
A PostgreSQL extension for automatically creating function call graphs
- Host: GitHub
- URL: https://github.com/johto/call_graph
- Owner: johto
- License: mit
- Created: 2012-09-06T08:06:27.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T14:51:13.000Z (almost 7 years ago)
- Last Synced: 2023-03-28T23:38:05.971Z (over 1 year ago)
- Language: Perl
- Homepage:
- Size: 412 KB
- Stars: 10
- Watchers: 7
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README
- License: LICENSE.md
Awesome Lists containing this project
README
Call_Graph is a module for PostgreSQL 9.1 and later which automatically tracks
function calls inside the database. That information can then be used to
create call graphs.The module needs to be loaded when the PostgreSQL server starts so you should
add 'call_graph' to your shared_preload_libraries in your postgresql.conf.
You should also add 'call_graph' to your custom_variable_classes. The
extension installs itself into the "call_graph" schema, creating it in case it
doesn't exist.By default, the module does not track any function calls. To enable tracking,
you need to enable the call_graph.enable GUC. You can do that on a per-session
(or even per-transaction) basis, or you can set it in postgresql.conf. See the
official PostgreSQL documentation for more information.It is also possible to track table usage information for each call graph.
However, due to the way this is currently implemented, it comes with a
significant performance penalty. You can enable table usage tracking
by setting call_graph.track_table_usage.To avoid lock contention the backends only append data into an unlogged table.
That table can then be periodically processed (using the
ProcessCallGraphBuffers function) to create the call graph information. In this
session, you will probably also want to set the configuration parameter
"call_graph.enable" to false to avoid generating data for the
ProcessCallGraphBuffers function.Note that installing the extension grants public access to the CallGraphBuffer
table, which means that malicious users can add bogus data into the table.