Re: How to find a number of connections - Mailing list pgsql-hackers

From Brusser, Michael
Subject Re: How to find a number of connections
Date
Msg-id DAF7A2046DD4A24F8F77B086F840BF1903B01564@msx11am.matrixone.net
Whole thread Raw
In response to How to find a number of connections  ("Brusser, Michael" <Michael.Brusser@matrixone.com>)
Responses Re: How to find a number of connections  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@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



pgsql-hackers by date:

Previous
From: Olivier Thauvin
Date:
Subject: vacuumlo doesn't seems to have help
Next
From: Tom Lane
Date:
Subject: Re: CONNECT BY PRIOR