Re: [HACKERS] removing the exec() from doexec() - Mailing list pgsql-hackers

From Brett McCormick
Subject Re: [HACKERS] removing the exec() from doexec()
Date
Msg-id 13639.57844.621418.82881@abraxas.scene.com
Whole thread Raw
In response to Re: [HACKERS] removing the exec() from doexec()  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: [HACKERS] removing the exec() from doexec()
List pgsql-hackers
sure enough..  well, try this on your OS and you can find out if perl
knows how to change it.  it doesn't work under solaris.  the args to
ps might be different for your system.

perl -e '$0 = "it_works!";system "ps -p $$"'

However, the args to the processes are so different that it seems easy
to tell the difference..  if you're a human.  computers might have
more trouble.  I've been known to use "killall postgres" (yes, I know,
I'm bad!!)

I only do it so that I can restart the postmaster.  Our webserver is
pretty much continually connected, and when it deadlocks, all the
clients queue up.  It would be nice to have a set of commands to show
you all connections, the machine/remote port they're from (for
identd), the username/dbname they're connected as, when they
connected, idle time, etc.  like "finger" for postgres.

I'm willing to work on it, if someone can point me in the right
direction.  (First things first though)

On Wed, 29 April 1998, at 23:20:52, The Hermit Hacker wrote:

>
>     Under FreeBSD, there is:
>
> setproctitle(3) - set the process title for ps 1
>
>     This isn't available under Solaris though, last I checked...
>
> Marc G. Fournier
> Systems Administrator @ hub.org
> primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org

pgsql-hackers by date:

Previous
From: Brett McCormick
Date:
Subject: data compression/encryption
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] removing the exec() from doexec()