Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] keeping track of connections

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: brett(at)work(dot)chicken(dot)org (Brett McCormick)
Cc: dg(at)illustra(dot)com, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] keeping track of connections
Date: 1998-06-03 12:58:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> On Wed, 3 June 1998, at 01:05:17, David Gould wrote:
> > I am curious, what is it you are trying to accomplish with this? Are you 
> > trying to build a persistant log that you can query later for billing
> > or load management/capacity planning information? Are you trying to monitor
> > login attempts for security auditing? Are you trying to catch logins in
> > real time for some sort of middleware integration?
> The problem is that when I do a process listing for the postgres user,
> I see many backends.  There's no (convenient) way to see what those
> backends are doing, what db they're connected to or the remote
> host/postgres user.
> My required functionality is this: a list of all backends and
> connection details.  IP, queries issued, listens/notifications
> requested/served, bytes transfered, postgres user, db, current query,
> client version, etcetcetc.

That's a lot of info.  One solution for database and username would be
to modify argv[1] and argv[2] for the postgres backend so it shows this
information on the ps command line.  As long as these args are already
used as part of startup ( and they are when started under the
postmaster), we could set argv to whatever values we are interested in,
and clear the rest of them so the output would look nice.

This would be easy to do, and I would be glad to do it.

> What problem am I trying to solve?  It is purely a desire for this
> information.  I also feel it will help be debug problems.  It would be
> nice to track down my clients that are now failing because of password
> authentication, but I do admit that this would not help much.

I think you need a log entry for that, and it would be a good idea.

Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-06-03 13:00:11
Subject: Re: [HACKERS] dump/reload
Previous:From: Bruce MomjianDate: 1998-06-03 12:43:18
Subject: Re: [HACKERS] keeping track of connections

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group