Re: Profiling a function call

From: Jan Wieck <jan(at)wi3ck(dot)info>
To: Tiffany Thang <tiffanythang(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Profiling a function call
Date: 2023-05-21 11:27:47
Message-ID: a4f86d7c-79c4-c70f-ead9-112243ec56e2@wi3ck.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/20/23 00:36, Tiffany Thang wrote:
> Hi,
> I have a function that has been executing for a long time and not
> returning any results. Wait event=NULL so it seems like it is still
> executing and not waiting on any specific resources. Is there a way to
> profile the function call to get an idea of what it is currently
> executing within the function? All I could find in pg_stat_activity is
> the function is running. I want to know what query/transaction within
> the function is running. Is there a way to obtain that information?

This may give you some idea. I haven't touched or used it in many years,
but it might get you started:

https://github.com/wieck/plbacktrace

Best Regards, Jan

>
> PostgreSQL 15.2 on Linux.
>
> Thanks.
>
> Tiff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2023-05-21 11:42:50 Re: Profiling a function call
Previous Message Marc Millas 2023-05-21 11:13:44 Re: Would PostgreSQL 16 native transparent data encryption support database level encryption?