From: | Stuart Bishop <stuart(dot)bishop(at)canonical(dot)com> |
---|---|
To: | Jim Nasby <decibel(at)decibel(dot)org> |
Cc: | Mark Shuttleworth <mark(at)ubuntu(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org, Martin Pitt <martin(dot)pitt(at)ubuntu(dot)com> |
Subject: | Re: elog(FATAL) vs shared memory |
Date: | 2007-04-12 13:14:55 |
Message-ID: | 461E30CF.4040800@canonical.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jim Nasby wrote:
> On Apr 11, 2007, at 6:23 PM, Jim Nasby wrote:
>> FWIW, you might want to put some safeguards in there so that you don't
>> try to inadvertently kill the backend that's running that function...
>> unfortunately I don't think there's a built-in function to tell you
>> the PID of the backend you're connected to; if you're connecting via
>> TCP you could use inet_client_addr() and inet_client_port(), but that
>> won't work if you're using the socket to connect.
>
> *wipes egg off face*
>
> There is a pg_backend_pid() function, even if it's not documented with
> the other functions (it's in the stats function stuff for some reason).
eh. No worries - my safeguard is just a comment saying 'don't connect to the
same database you are killing the connections of' :-)
--
Stuart Bishop <stuart(dot)bishop(at)canonical(dot)com> http://www.canonical.com/
Canonical Ltd. http://www.ubuntu.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2007-04-12 13:26:24 | Re: Slow Postgresql server |
Previous Message | Ranjan Sahoo | 2007-04-12 13:06:39 | Benchmarking tools for the Postgres, EDB and Oracle Database |