PostgreSQL::PLPerl::Trace is a simple way to trace execution of Perl statements in PL/Perl. WWW: https://metacpan.org/release/PostgreSQL-PLPerl-Trace