Re: Monitoring Connections

From: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
To: "Aaron Bono" <postgresql(at)aranya(dot)com>
Cc: "pgsql admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Monitoring Connections
Date: 2006-09-20 19:15:10
Message-ID: CB0FB369FF86E248A884BCC002562BCB0227DA20@pisgsna01sxch01.ana.firstamdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

The backend_start column in pg_stat_activity system view gives you the
start time of the backend connection which's what you see in the ps
command; however, the query_start column should give you the start time
of last query within the connection. The values of these columns may
not be necessarily the same if you're using connection pooling. If you
don't see the data for these columns, make sure to enable the stats
collection on your pg postgresql.conf file (stats_* parameters).

Regards,

--
Husam
http://firstdba.googlepages.com


________________________________

From: aaron(dot)bono(at)gmail(dot)com [mailto:aaron(dot)bono(at)gmail(dot)com] On Behalf Of
Aaron Bono
Sent: Wednesday, September 20, 2006 11:46 AM
To: Tomeh, Husam
Cc: pgsql admin
Subject: Re: [ADMIN] Monitoring Connections

I checked the pg_stat_activity table and it doesn't give any more
information than I got from the ps command.

Is there any way to find out the last time the connection was used?

Thanks,
Aaron

==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
http://codeelixir.com
==================================================================

**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

FADLD Tag
**********************************************************************

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Frost 2006-09-20 19:20:47 Re: Monitoring Connections
Previous Message Aaron Bono 2006-09-20 18:46:00 Re: Monitoring Connections