Re: High-water Mark for number of sessions/connections reached in Postgres - Mailing list pgsql-admin

From Tomeh, Husam
Subject Re: High-water Mark for number of sessions/connections reached in Postgres
Date
Msg-id F849E59B1BB96C42A849EBCD724513F515FC3CF6F2@ISCESNA01CXMB02.infosolco.net
Whole thread Raw
In response to Re: High-water Mark for number of sessions/connections reached in Postgres  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: High-water Mark for number of sessions/connections reached in Postgres
List pgsql-admin
Thanks for these workarounds I have something similar implemented. It would've been nice to have Postgres maintain the
high-watermark inside the database in a pg view such as pg_stat_database. This is useful from a capacity perspective
wherethat can be monitored to alert DBAs when a threshold is reached. Other DB engines has such feature built in such
asOracle. Perhaps something to be on Postgres TO DO  list soon  :)
 

Regards,
      Husam

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Alvaro Herrera
Sent: Monday, August 09, 2010 3:39 PM
To: Scott Marlowe
Cc: Tomeh, Husam; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] High-water Mark for number of sessions/connections reached in Postgres

Excerpts from Scott Marlowe's message of lun ago 09 18:29:58 -0400 2010:
> If you want a date stamp, you can change the ps ax stuff to look like this:
> 
> date +"%Y-%m-%d %H:%M:%S"|tr "\n" ":";ps ax|grep postgres:|grep -v grep|wc -l

FWIW the "grep" business is best solved by ps itself, something like 
ps ax -C postgres

date +"%Y-%m-%d %H:%M:%S"|tr "\n" ":";ps ax -C  postgres|wc -l

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
******************************************************************************************
This message may contain confidential or proprietary information intended only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to the intended 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 and any copies immediately thereafter.

Thank you.
******************************************************************************************
CLLD

pgsql-admin by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: High-water Mark for number of sessions/connections reached in Postgres
Next
From: Bruce Momjian
Date:
Subject: Re: How to move a database from HP server to Linux Server that had already one database.