Re: How to find a number of connections

From: "Brusser, Michael" <Michael(dot)Brusser(at)matrixone(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to find a number of connections
Date: 2005-11-12 14:45:06
Message-ID: DAF7A2046DD4A24F8F77B086F840BF1903B01564@msx11am.matrixone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-12 15:34:14 Re: CONNECT BY PRIOR
Previous Message Olivier Thauvin 2005-11-12 14:01:26 vacuumlo doesn't seems to have help