pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Locks analyze
Date: Fri, 13 Oct 2023 13:59:35 +0200
Message-ID: <f7d8b0bc16be17cc38d97ce90ad9060f7fb9d8f3.camel@cybertec.at> (raw)
In-Reply-To: <CAJk5AtZBhKzgu9KOMDxyC7FxTsULS2hWRJ=Zod+2kzmL+KEhnw@mail.gmail.com>
References: <CAJk5AtaHsNNp-R3zmeeZ9G06LH_yHXEdCN7TpeR2HTO4Tde7Hw@mail.gmail.com>
	<91d371667a3e27cb0da7001d048d1c417074b6ef.camel@cybertec.at>
	<CAJk5AtZBhKzgu9KOMDxyC7FxTsULS2hWRJ=Zod+2kzmL+KEhnw@mail.gmail.com>

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





view thread (7+ messages)  latest in thread

Message-ID: <f7d8b0bc16be17cc38d97ce90ad9060f7fb9d8f3.camel@cybertec.at>
Permalink:  ../f7d8b0bc16be17cc38d97ce90ad9060f7fb9d8f3.camel@cybertec.at/
Also on:    postgresql.org/message-id/f7d8b0bc16be17cc38d97ce90ad9060f7fb9d8f3.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Locks analyze
  In-Reply-To: <f7d8b0bc16be17cc38d97ce90ad9060f7fb9d8f3.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox