Re: High-water Mark for number of sessions/connections reached in Postgres

From: "Tomeh, Husam" <HTomeh(at)corelogic(dot)com>
To: 'Alvaro Herrera' <alvherre(at)commandprompt(dot)com>, 'Scott Marlowe' <scott(dot)marlowe(at)gmail(dot)com>
Cc: "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: High-water Mark for number of sessions/connections reached in Postgres
Date: 2010-08-09 23:33:48
Message-ID: F849E59B1BB96C42A849EBCD724513F515FC3CF6F2@ISCESNA01CXMB02.infosolco.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks for these workarounds I have something similar implemented. It would've been nice to have Postgres maintain the high-water mark inside the database in a pg view such as pg_stat_database. This is useful from a capacity perspective where that can be monitored to alert DBAs when a threshold is reached. Other DB engines has such feature built in such as Oracle. Perhaps something to be on Postgres TO DO list soon :)

Regards,
Husam

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Alvaro Herrera
Sent: Monday, August 09, 2010 3:39 PM
To: Scott Marlowe
Cc: Tomeh, Husam; pgsql-admin(at)postgresql(dot)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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2010-08-10 00:14:49 Re: How to move a database from HP server to Linux Server that had already one database.
Previous Message Alvaro Herrera 2010-08-09 22:39:16 Re: High-water Mark for number of sessions/connections reached in Postgres