pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Vivek_Sharan <Vivek_Sharan@infosys.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Heavy postgres process
Date: Fri, 12 Sep 2008 11:47:38 -0600
Message-ID: <dcc563d10809121047n34e16435i4f57e5a20c87da0c@mail.gmail.com> (raw)
In-Reply-To: <5465CC59A600E2408FFBF84350B938345031E95B93@AUSMELMBX01.ad.infosys.com>
References: <5465CC59A600E2408FFBF84350B938345031E95B93@AUSMELMBX01.ad.infosys.com>

On Fri, Sep 12, 2008 at 2:12 AM, Vivek_Sharan <Vivek_Sharan@infosys.com> wrote:
> Hi Admin,
>
> I'm new to this I have few queries as listed below
>
> 1)      Number of connections made with a particular database.

Wait, how to find out how many connections there are, or how many can
a particular db handle.

For this kind of thing, look at the admin functions in the pgsql-sql docs:

http://www.postgresql.org/docs/8.3/interactive/functions-admin.html

specifically you want something like:

select datname from pg_stat_activity;
select datname, count(datname)  from pg_stat_activity group by datname;

> 2)      And how can I check which process (PID) is responsible for the
> connection and

That table up there ^^^

> 3)      what all can make a postgres process as heavy as 70-80 MB in size

you may not be measuring properly.  When you say it's using 70-80 MB
how do you know this?  The numbers you see in top aren't necessarily
what some folks think they ar.



view thread (20+ messages)  latest in thread

Message-ID: <dcc563d10809121047n34e16435i4f57e5a20c87da0c@mail.gmail.com>
Permalink:  ../dcc563d10809121047n34e16435i4f57e5a20c87da0c@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10809121047n34e16435i4f57e5a20c87da0c@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott.marlowe@gmail.com, Vivek_Sharan@infosys.com
  Subject: Re: Heavy postgres process
  In-Reply-To: <dcc563d10809121047n34e16435i4f57e5a20c87da0c@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox