pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: getting pid of backend
Date: Tue, 05 Mar 2002 18:37:23 -0500
Message-ID: <19415.1015371443@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.21.0203052348130.13904-100000@pc10.radnoti-szeged.sulinet.hu>
References: <Pine.LNX.4.21.0203052348130.13904-100000@pc10.radnoti-szeged.sulinet.hu>

Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> I mean the current pid number of the actual connection. Not the postmaster
> process, I need the pid of the currently running postgres. :-)

I don't believe it's available as a SQL query, but libpq can tell you
what it is.

Probably a more interesting question is "why do you want to know?".
I can't offhand think of a really good reason to use the backend pid
for anything on the client side, other than distinguishing self-notifies
from other notifies, which is not something you can do at the SQL level
anyway.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <19415.1015371443@sss.pgh.pa.us>
Permalink:  ../19415.1015371443@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19415.1015371443@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kovacsz@pc10.radnoti-szeged.sulinet.hu, josh@agliodbs.com
  Subject: Re: getting pid of backend
  In-Reply-To: <19415.1015371443@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox