EDB SPL Check provides a tracing option where you can see notices on start or end functions (terse and default verbosity) and start or end statements (verbose verbosity). For default and verbose verbosity, this option displays the content of function arguments. The content of related variables diplay when verbosity is verbose. For example:
The number that follows # is the execution frame counter. This number is related to the depth of the error context stack. It allows you to pair the start and end of a function.
Using the tracer
To enable tracing, set spl_check.tracer to on.
Enabling tracing can have a significant impact on performance. To prevent performance issues, you can set a level for outputs used by the tracer with spl_check.tracer_errlevel. (The default is notice.) You can limit the output content according to the length specified with the spl_check.tracer_variable_max_length configuration variable.
As a security safeguard, we recommend that the use of the tracer be enabled by a superuser by setting spl_check.enable_tracer to on or spl_check.enable_tracer to on in postgresql.conf. Because the tracer shows the content of EDB SPL Check's variables, some sensitive security information can display for an unprivileged user.
We also recommend that you load the extension spl_check. You can execute some spl_check functions explicitly with load 'spl_check';. You can also set the configuration options in shared_preload_libraries, local_preload_libraries, or session_preload_libraries options to load spl_check.
In terse verbose mode, the output is reduced:
In verbose mode, the output is extended with statement details:
A special feature of the tracer is the tracing of the ASSERT statement when spl_check.trace_assert is on. When spl_check.trace_assert_verbosity is DEFAULT and the ASSERT statement is false, all function or procedure variables are displayed. When this configuration is VERBOSE, all variables from all EDB SPL frames are displayed. This behavior is independent of the spl.check_asserts value. It can be used, but the assertions are disabled during EDB SPL runtime. For example: