pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ray Stell <stellr@vt.edu>
To: Debraj Manna <subharaj.manna@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: pg_stat_activity doubts
Date: Thu, 22 Mar 2018 10:16:34 -0400
Message-ID: <81a8bd42-a869-b4b3-62d0-d7c70e2d94c1@vt.edu> (raw)
In-Reply-To: <CAF6DVKMBeJNPNh7ymoXMrX4yuQSp3ZTb=+rNq4xFYR6RRC063A@mail.gmail.com>
References: <CAF6DVKPf6-d3mn7t+N2bvHTB_zi2hWrDOL83FFj8xPrRWiXDqg@mail.gmail.com>
	<12be0586-aad1-4b4d-57f6-05514c52627e@vt.edu>
	<CAF6DVKMBeJNPNh7ymoXMrX4yuQSp3ZTb=+rNq4xFYR6RRC063A@mail.gmail.com>

On 3/22/18 10:01 AM, Debraj Manna wrote:

> Thanks Ray .
>
> Any thoughts on my query #3?

I would do an strace on the pid to see what is underneath.  Might give a 
clue where to look in the code.

>
> On Thu 22 Mar, 2018, 7:13 PM Ray Stell, <stellr@vt.edu 
> <mailto:stellr@vt.edu>> wrote:
>
>     On 3/22/18 8:45 AM, Debraj Manna wrote:
>
>>     Hi
>>
>>     Can someone resolve my below doubts about pg_stat_activity :-
>>
>>      1. Can someone let me know how pg_stat_activity is populated? If
>>         I am executing a query like `Select * from pg_stat_activity`
>>         does it produce the details from some snapshot maintained by
>>         postgres or it checks the current connections open in
>>         postgres to provide the details?
>>      2. Can some let me know what does the state IDLE denotes in the
>>         row of pg_stat_activity? Is it like it checks all the open
>>         connections to postgres and if the connection is not
>>         executing any query then IDLE denotes the last query executed
>>         by the connection?
>>      3. In the output of select * from pg_stat_activity I am seeing
>>         rows with state IDLE and the query_start_date more than 2
>>         days old? What does this signify ? Should I be worried about
>>         this?
>>     4.
>>
>

view thread (5+ messages)

Message-ID: <81a8bd42-a869-b4b3-62d0-d7c70e2d94c1@vt.edu>
Permalink:  ../81a8bd42-a869-b4b3-62d0-d7c70e2d94c1@vt.edu/
Also on:    postgresql.org/message-id/81a8bd42-a869-b4b3-62d0-d7c70e2d94c1@vt.edu

 · 

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-admin@postgresql.org
  Cc: stellr@vt.edu, subharaj.manna@gmail.com
  Subject: Re: pg_stat_activity doubts
  In-Reply-To: <81a8bd42-a869-b4b3-62d0-d7c70e2d94c1@vt.edu>
  References: <CAF6DVKPf6-d3mn7t+N2bvHTB_zi2hWrDOL83FFj8xPrRWiXDqg@mail.gmail.com> <12be0586-aad1-4b4d-57f6-05514c52627e@vt.edu> <CAF6DVKMBeJNPNh7ymoXMrX4yuQSp3ZTb=+rNq4xFYR6RRC063A@mail.gmail.com> <81a8bd42-a869-b4b3-62d0-d7c70e2d94c1@vt.edu>

* 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