Re: Finding detailed information about LOCKS

From: Siraj G <tosiraj(dot)g(at)gmail(dot)com>
To: "Wetmore, Matthew (CTR)" <Matthew(dot)Wetmore(at)evernorth(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Finding detailed information about LOCKS
Date: 2024-05-06 04:24:26
Message-ID: CAC5iy61ZCt10HtBuWM3+jDoOyi9smqpcDM_2M_Q0nUEy72Q2=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello Team
Thank you for the responses.

There are a few environments that are GCP managed, in our landscape. Hence
I am also exploring the DB flags and if there are anything that I can set
up as a cron from the jumphost.

On Fri, May 3, 2024 at 7:34 PM Wetmore, Matthew (CTR) <
Matthew(dot)Wetmore(at)evernorth(dot)com> wrote:

> If you can't get pgwatch2
>
> Cron job that runs every hour:
>
> grep -E "lock" (or whatever search term) postgresql.log > lock_history.txt
>
> Or something to that effect, not as good as the tool obviously, but a
> workingperson's solution.
>
> -----Original Message-----
> From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
> Sent: Thursday, May 2, 2024 11:16 PM
> To: Siraj G <tosiraj(dot)g(at)gmail(dot)com>; Pgsql-admin <
> pgsql-admin(at)lists(dot)postgresql(dot)org>
> Subject: [EXTERNAL] Re: Finding detailed information about LOCKS
>
> On Fri, 2024-05-03 at 10:54 +0530, Siraj G wrote:
> > I come from Oracle background. In Oracle there is a licensed feature
> > (Diagnostics + Tuning) upon using which the system keeps historic
> > session records, which gives a better way to find out locking related
> > details- like the blocking session, total sessions blocked and the
> > time the blocking event was active. I am finding it a little hard in
> PgSQL to find this information.
> >
> > I am seeking help in finding a detailed analysis on the locks that
> > happened yesterday,
> > 2 days back or in the last week. Can someone assist please.
>
> PostgreSQL doesn't keep historical information on these things.
>
> You need a monitoring tool like pgwatch2 that takes regular snapshots of
> these data and allows you to access this information.
>
> Yours,
> Laurenz Albe
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Rajesh Kumar 2024-05-06 05:46:10 Health check report
Previous Message Edwin UY 2024-05-05 07:29:07 Re: Foreign tables - oracle_fdw