connections

From: "Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com>
To: "pgadmin-hackers" <pgadmin-hackers(at)postgresql(dot)org>
Subject: connections
Date: 2008-04-18 18:30:29
Message-ID: 1A6E6D554222284AB25ABE3229A92762E9A1D8@nrtexcus702.int.asurion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

With pgAdmin, every window is a new connection to the database and this
alone wastes resources when you have lots of users.

select count(distinct usename) as unique_users,
count(*) as total_count,
count(*)/cast(count(distinct usename) as float8)
from pg_stat_activity;

For our system, we currently have 9 distinct users connected with a
total of 30 connections which translates to over 3 connections per user.
This makes sense because pgAdmin creates 1 connection for the main UI, 1
connection to the Maintenance database, and 1 connection per SQL window.

Now my system is actually running Greenplum which means I have 16 more
(17 total) connections per user's connection because each segment host
running gets a connection. So my measly 9 users actually are consuming
510 database connections!

EnterpriseDB now has a similar product to Greenplum
http://www.enterprisedb.com/community/projects/gridsql.do and I'm
assuming it does the same thing. It certainly does look that way based
on the fact both products make use of parallel execution with shared
nothing parallel database servers.

I would greatly prefer if pgAdmin only created a connection if it needed
to. If a query window is busy and a user attempts to execute SQL while
the other window is busy, then it would create a new session. A simpler
solution would be only to allow one connection per pgAdmin instance.

Is this even on the radar for EnterpriseDB or pgAdmin users? Is this
even considered a problem?

Jon

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2008-04-20 16:42:10 SVN Commit by dpage: r7229 - trunk/pgadmin3/pgadmin/frm
Previous Message Kev 2008-04-17 14:41:33 'nothing to change' when deleting primary key column