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

From Jim Mercer
Subject Re: [GENERAL] proctitle patch (useful)
Date
Msg-id 19991224125311.B4188@reptiles.org
Whole thread Raw
In response to Re: [GENERAL] proctitle patch (useful)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [GENERAL] proctitle patch (useful)  (Bruce Momjian <pgman@candle.pha.pa.us>)
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.

> 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.

--
[ Jim Mercer                 jim@reptiles.org              +1 416 506-0654 ]
[          Reptilian Research -- Longer Life through Colder Blood          ]
[  Don't be fooled by cheap Finnish imitations; BSD is the One True Code.  ]

pgsql-general by date:

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