Re: Locks analyze - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Locks analyze
Date
Msg-id f7d8b0bc16be17cc38d97ce90ad9060f7fb9d8f3.camel@cybertec.at
Whole thread Raw
In response to Re: Locks analyze  (Rajesh Kumar <rajeshkumar.dba09@gmail.com>)
List pgsql-admin
On Fri, 2023-10-13 at 15:09 +0530, Rajesh Kumar wrote:
> How do I identify a session that is blocked?

See "wait_event_type" in "pg_stat_activity" (or see "pg_locks").

> Can blocking sessions increase idle sessions?

Only within certain limits, unless your applicaton is doing something wrong.

> I see something like waitdurarion in pg_locks..is that helpful anyway?

Yes, that means that the session has been waiting for the lock for a while.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Rajesh Kumar
Date:
Subject: Re: Locks analyze
Next
From: Jean-Christophe Boggio
Date:
Subject: One PG process eating more than 40GB of RAM and getting killed by OOM