pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Samuel Smith <pgsql@net153.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Monitoring for long running transactions
Date: Thu, 4 Jun 2020 13:24:30 -0700
Message-ID: <a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com> (raw)
In-Reply-To: <920bb4ce-6ba8-2888-6239-52a15474fc58@net153.net>
References: <d2f5ded1-7820-e25f-2477-403283fbb2d0@net153.net>
	<d2b17c01-bde0-7860-80d0-753d5c99a602@aklaver.com>
	<920bb4ce-6ba8-2888-6239-52a15474fc58@net153.net>

On 6/4/20 12:59 PM, Samuel Smith wrote:
> On 6/4/20 2:29 PM, Adrian Klaver wrote:

>>
> 
> 
> Sorry, I should have clarified that I was aware of the pg_stat_activity 
> table. That is how we found the problem in the first place. And yes I 
> could just write a bash script and run it in cron. I just didn't know if 
> there was a more "official" way to go about this since it is probably a 
> common monitoring point and/or if something like this was already made.

I guess it comes down to how much info you want. A list of monitoring tools:

https://wiki.postgresql.org/wiki/Monitoring#pgcenter

Haven't used it but this one:

https://pgmetrics.io/

looks interesting. From here:

https://pgmetrics.io/docs/

Active backends: transaction running too long, idling in transaction, 
waiting for locks

Information on scripting above:

https://pgmetrics.io/docs/scripting.html


> 
> Regards,
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (6+ messages)  latest in thread

Message-ID: <a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com>
Permalink:  ../a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com/
Also on:    postgresql.org/message-id/a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, pgsql@net153.net
  Subject: Re: Monitoring for long running transactions
  In-Reply-To: <a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com>
  References: <d2f5ded1-7820-e25f-2477-403283fbb2d0@net153.net> <d2b17c01-bde0-7860-80d0-753d5c99a602@aklaver.com> <920bb4ce-6ba8-2888-6239-52a15474fc58@net153.net> <a1814b67-07bf-6a95-0d35-e1c7a0b9439d@aklaver.com>

* 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