Hi

I need to know any way to query which active function is running now in postgresql.

I need to implement a function that ensure no previous copy of itself is active in memory before running it to prevent deadlock.

Thank you