Re: getting pid of backend

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: getting pid of backend
Дата
Msg-id 200203052334.g25NYu403277@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: getting pid of backend  (Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>)
Список pgsql-sql
Kovacs Zoltan wrote:
> On Tue, 5 Mar 2002, Josh Berkus wrote:
> 
> > Kovacs,
> > 
> > > Is there an easier method?
> > 
> > Much easier.  Take a look at $PGDATA/postmaster.pid
> 
> I mean the current pid number of the actual connection. Not the postmaster
> process, I need the pid of the currently running postgres. :-)

You are going to love this one:test=> create function getpid() returns int as '/shlib/libc.so',        'getpid'
languagec;CREATEtest=> select getpid(); getpid --------   2971(1 row)
 

You may need to modify the libc.so path.

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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Kovacs Zoltan
Дата:
Сообщение: Re: getting pid of backend
Следующее
От: Tom Lane
Дата:
Сообщение: Re: getting pid of backend