getting pid of backend

From: Kovacs Zoltan <kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu>
To: pgsql-sql(at)postgresql(dot)org
Subject: getting pid of backend
Date: 2002-03-05 17:52:15
Message-ID: Pine.LNX.4.21.0203051749440.13485-100000@pc10.radnoti-szeged.sulinet.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Is there a way to read the pid of the actual backend from SQL? I know a
dirty workaround:

setting debug=2, log_pid=yes in postgresql.conf;

writing a function doing this:

executing a 'SELECT a_generated_random_number';
while not found pid
reading from the postmaster log waiting for a_generated_random_number.

Is there an easier method?

--
Kov\'acs, Zolt\'an
kovacsz(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu
http://www.math.u-szeged.hu/~kovzol
ftp://pc10.radnoti-szeged.sulinet.hu/home/kovacsz

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-03-05 18:21:58 Re: getting pid of backend
Previous Message Ashley Clark 2002-03-05 15:49:28 Re: PL/pgSQL Syntax Problem