Re: [GENERAL] proctitle patch (useful) - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] proctitle patch (useful)
Date
Msg-id 199912242028.PAA15686@candle.pha.pa.us
Whole thread Raw
In response to Re: [GENERAL] proctitle patch (useful)  (Jim Mercer <jim@reptiles.org>)
List pgsql-general
> On Fri, Dec 24, 1999 at 12:09:31PM -0500, Bruce Momjian wrote:
> > The problem is that we already have a complex system of displaying the
> > user, database, and SQL command being executed.
>
> the current proctitle doesn't allow me to find the PID of the client process,
> without guessing.
>
> it becomes even worse when the client process is on a different machine.
>
> using ProcTitle, i can have the client process set the proctitle to something
> meaningful like "%s:%s:%d:%s", hostname, prgname, pid, status.
>
> in my case, i'm actually opening multiple sessions on the same database,
> so i'd like to know which backends are for which sessions.

A larger question is whether we want SQL clients to be able to control
this display.  I certainly makes spoofing possible, where I look like
one person, but am actually someone else.

>
> > You should be seeing this on your platform already.  What OS and pgsql
> > version?
> >
> > In other words, you should not be seeing this:
> >
> > > 11080 ??  Is     0:00.06 postmaster -S -i -d 3 -o -F (postgres)
>
> that example was from NetBSD 1.4.1 and pgsql 6.5.3
>
> on freebsd it looks like:
> bigbird% ps auxww | grep post
> pgsql   16429  0.0  0.5  4004 1496  ??  Ss   Mon11PM   0:41.06 /usr/local/pgsql/bin/postmaster -i -S -o -F
-D/usr/local/pgsql/data(postgres) 
> pgsql   10317  0.0  0.8  4468 2672  ??  S    12:43PM   0:00.03 /usr/local/pgsql/bin/postgres dbadmin localhost nagoss
idle
>
> (for some reason, i can't get my NetBSD box to do the same thing)
>
> now that i think about it, the hack needs a little refining, to basically tell
> the other code not to overwrite the ProcTitle.

I don't understand why NetBSD doesn't do it, while FreeBSD and BSDI do.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Jim Mercer
Date:
Subject: Re: [GENERAL] proctitle patch (useful)
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] proctitle patch (useful)