How to find a number of connections
On Fri, Nov 11, 2005 at 15:09:41 -0500,
"Brusser, Michael" <Michael.Brusser@matrixone.com> wrote:
Is there a way to find a number of current connections on Postgres 7.3.x
?
This might help you:
http://www.postgresql.org/docs/7.3/static/monitoring.html
Brusser, Michael wrote:
Is there a way to find a number of current connections on Postgres 7.3.x
?
select count(*) from pg_stat_activity
--
Bryan White, ArcaMax Publishing Inc.
I never look back, darling. it distracts from the now. - Edna Mode
Please disregard this duplicate submission, my mistake.
Mike
________________________________
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Brusser,
Michael
Sent: Friday, November 11, 2005 12:35 PM
To: pgsql-hackers@postgresql.org
Subject: [HACKERS] How to find a number of connections
Is there a way to find a number of current connections on Postgres 7.3.x
?
I looked at some system tables and views, but did not see anything
obvious.
Thank you,
Mike
Import Notes
Resolved by subject fallback
Thank you, this is very handy.
I'd like to understand why the result of this query is different
from the number of Postgres processes reported by `ps`.
(The query returns 8, ps shows 11)
One process is really postmaster, the others seem to be doing some
house chores: stats buffer process and stats collector process.
Do they actually use connections, decrementing what's available from
the max_connections value?
Thank you
-----Original Message-----
From: pgsql-hackers-owner@postgresql On Behalf Of Bryan White
... ...
Brusser, Michael wrote:
Is there a way to find a number of current connections on Postgres
7.3.x ?
select count(*) from pg_stat_activity
Import Notes
Resolved by subject fallback
"Brusser, Michael" <Michael.Brusser@matrixone.com> writes:
One process is really postmaster, the others seem to be doing some
house chores: stats buffer process and stats collector process.
Do they actually use connections,
No.
regards, tom lane
Tom Lane wrote:
"Brusser, Michael" <Michael.Brusser@matrixone.com> writes:
One process is really postmaster, the others seem to be doing some
house chores: stats buffer process and stats collector process.
Do they actually use connections,No.
But note that in 8.1, autovacuum does.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support