Re: RDS postgresql 17 function monitoring

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: RDS postgresql 17 function monitoring
Date: 2026-10-19 16:51:26
Message-ID: CANzqJaD4oPOmz-eRR08AqpjhxaGHcTbDor6x_i1e-x8e03B1kA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Oct 19, 2026 at 12:17 PM Brajendra Pratap Singh <
singh(dot)bpratap766(at)gmail(dot)com> wrote:

> Hi All,
>
> We need to monitor a function which is running since long to understand at
> which step it is currently running and taking long time to debug the
> function.
>
> Please suggest and let me know if any further information is required
>

I had to spin up a full-sized test database, and add lots of RAISE NOTICE
statements showing the timestamp and what data it was working on at that
moment. The sad part was that it ran fast when run once, but was slow when
called more than five times. "set plan_cache_mode = force_custom_plan;"
solved *my* problem.

Of course, your problem is certainly different. Decomposing it, running
EXPLAIN, looking for sequential scans (including in FK references) is the
way.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2026-10-19 16:56:04 Re: RDS postgresql 17 function monitoring
Previous Message Justin 2026-10-19 14:27:38 Re: Regarding huge logical slot lag between source and target