How to find a number of connections
How to find a number of connections
От:
"Brusser, Michael" <Michael.Brusser@matrixone.com>
Дата:
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
Re: How to find a number of connections
От:
"Brusser, Michael" <Michael.Brusser@matrixone.com>
Дата:
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
Re: How to find a number of connections
От:
"Brusser, Michael" <Michael.Brusser@matrixone.com>
Дата:
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
Re: How to find a number of connections
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Brusser, Michael" 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
Re: How to find a number of connections
От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Tom Lane wrote: > "Brusser, Michael" 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
Re: How to find a number of connections
От:
"Jim C. Nasby" <jnasby@pervasive.com>
Дата:
It would be better to ask this on -general, but SELECT count(*) FROM pg_stat_activity; is what you want. On Fri, Nov 11, 2005 at 12:35:28PM -0500, Brusser, Michael wrote: > 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 > > > -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461