Documentation : pg_stat_monitor does not support stored procedures.

Description

As per comment by Ibrar in PG-147, we need to update documentation to mention that, PGSM only support functions only at this point, and not stored procedures right now.

Here is the expected behaviour for PGSM 2.0.0 with regard to Stored Procedure (SP) and function.
You have to set pg_stat_monitor.pgsm_track_utility = 'on' in settings to track the SP call. Where as non utility statements within SP will show up as normally without mention of top_queryid and top_query.
(Note: Here 'call proc_transfer' is the call to procedure and rest two are subqueries within the same SP)

Whereas for functions, top_queryid and top_query is available as expected.
(Note: Here 'Select func_transfer(1,2,1)' is the call to the function and rest three are subqueries within the same function)

For tracking subqueries for both functions and SP, one have to enable as, Set pg_stat_monitor.pgsm_track = 'all';

How to document

None

How to test

None

Activity

Show:
Done

Details

Assignee

Reporter

Affects versions

Priority

Smart Checklist

Created April 6, 2023 at 3:43 PM
Updated March 12, 2025 at 7:09 AM
Resolved April 24, 2023 at 9:09 AM