Search Postgresql Archives

Re: SQL call to get pid of current connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That certainly looks like it! Thanks!

- DAP 

>-----Original Message-----
>From: Michael Fuhr [mailto:mike@xxxxxxxx] 
>Sent: Thursday, June 02, 2005 8:47 PM
>To: Bruno Wolff III; David Parker; postgres general
>Subject: Re:  SQL call to get pid of current connection
>
>On Thu, Jun 02, 2005 at 05:02:14PM -0500, Bruno Wolff III wrote:
>> On Thu, Jun 02, 2005 at 17:04:22 -0400,
>>   David Parker <dparker@xxxxxxxxxxxxxxxx> wrote:
>> > Is there a function call that will return the pid of the postgres 
>> > process associated with the current client connection?
>> 
>> I thought I remembered seeing one, but I looked through the 
>> development docs and didn't see a function or a GUC variable 
>with that information.
>
>Are you looking for pg_backend_pid()?  It's documented in the 
>"Statistics Collector" section of the "Monitoring Database Activity"
>chapter; it's been around since 7.3:
>
>http://www.postgresql.org/docs/7.3/interactive/release-7-3.html
>http://www.postgresql.org/docs/7.3/interactive/monitoring-stats.html
>http://www.postgresql.org/docs/7.4/interactive/monitoring-stats.html
>http://www.postgresql.org/docs/8.0/interactive/monitoring-stats.html
>
>--
>Michael Fuhr
>http://www.fuhr.org/~mfuhr/
>

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux