getting pid of backend - Mailing list pgsql-sql

From Kovacs Zoltan
Subject getting pid of backend
Date
Msg-id Pine.LNX.4.21.0203051749440.13485-100000@pc10.radnoti-szeged.sulinet.hu
Whole thread Raw
Responses Re: getting pid of backend  ("Josh Berkus" <josh@agliodbs.com>)
List 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 pidreading from the postmaster log waiting for a_generated_random_number.

Is there an easier method?

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




pgsql-sql by date:

Previous
From: Ismail Bouabdallah
Date:
Subject: ERROR: fmgr_info: function 56664: cache lookup failed
Next
From: "Josh Berkus"
Date:
Subject: Re: getting pid of backend