Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

pg_stat_activity – is it possible to decompose a stored procedure further?

$
0
0

I got a long running query in pg_stat_activity:

 datid | datname  | pid  | usesysid | usename |   application_name    | client_addr | client_hostname | client_port |         backend_start         |          xact_start           |          query_start          |         state_change          | waiting | state  |                      query                       
-------+----------+------+----------+---------+-----------------------+-------------+-----------------+-------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------+---------+--------+--------------------------------------------------
 16385 | binstore | 3325 |    16644 | bucardo | bucardo KID (fe8fe10) |             |                 |          -1 | 2015-02-02 23:45:17.133177+00 | 2015-02-03 03:37:45.894859+00 | 2015-02-03 03:37:45.926591+00 | 2015-02-03 03:37:45.926592+00 | f       | active | SELECT * FROM bucardo.bucardo_delta_check($1,$2)
(1 row)

The question is: is it possible to break down this bucardo.bucardo_delta_check stored procedure anyhow to get a notion of what exactly causes this query to run so long? Basically, I need an exact number of line of the SP code executing right now.


Viewing all articles
Browse latest Browse all 1138

Latest Images

Trending Articles



Latest Images