Skip site navigation (1) Skip section navigation (2)

Re: getpid() function

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: getpid() function
Date: 2002-07-31 01:48:42
Message-ID: 200207310148.g6V1mg713116@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
OK, renamed to backend_pid() to match the libpq name.  I was unsure
about merging it into the stats stuff myself.
	
	setest=> select backend_pid();
	 backend_pid 
	-------------
	       12996
	(1 row)

Where does the mention belong in the docs? I have it in the monitoring
section in the stats section right now.

---------------------------------------------------------------------------

Neil Conway wrote:
> On Tue, Jul 30, 2002 at 08:40:13PM -0400, Bruce Momjian wrote:
> > I have implemented this TODO item:
> > 
> > 	* Add getpid() function to backend
> > 
> > There were a large number of pg_stat functions that access pids and
> > backends slots so I added it there:
> > 	
> > 	test=> select pg_stat_get_backend_mypid();
> 
> If we're going to add it to pg_stat_*, why is 'backend' part of the
> name? All the existing backend_* function fetch some piece of data
> about a given backend -- whereas this function does not (it takes
> no arguments).
> 
> IMHO, a better name would be something like 'backend_process_id()',
> or 'unix_pid', or 'backend_pid()'.
> 
> Also, can you add some documentation on this?
> 
> Cheers,
> 
> Neil
> 
> -- 
> Neil Conway <neilconway(at)rogers(dot)com>
> PGP Key ID: DB3C29FC
> 

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

In response to

Responses

pgsql-hackers by date

Next:From: Neil ConwayDate: 2002-07-31 01:59:29
Subject: Re: getpid() function
Previous:From: Neil ConwayDate: 2002-07-31 01:17:58
Subject: Re: getpid() function

pgsql-general by date

Next:From: Neil ConwayDate: 2002-07-31 01:59:29
Subject: Re: getpid() function
Previous:From: --CELKO--Date: 2002-07-31 01:46:53
Subject: Re: Closing Gaps in Celko trees

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group