Re: How to get the PID associated with a Perl DBI dbh?

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to get the PID associated with a Perl DBI dbh?
Date: 2009-03-12 14:27:13
Message-ID: 20090312142713.GG24273@eddie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 12, 2009 at 03:13:13PM +0100, A. Kretschmer wrote:
> In response to Kynn Jones :
> > Is there a reliable way to find out the (Unix) PID associated with a database
> > handle generated by Perl DBI's database connection?
>
> You can ask the pg_stat_activity - View, column procpid.

The query "select pg_backend_pid()" issued through that handle will also
return the PID.

- Josh / eggyknap

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martin Gainty 2009-03-12 14:36:52 Re: How to get the PID associated with a Perl DBI dbh?
Previous Message A. Kretschmer 2009-03-12 14:13:13 Re: How to get the PID associated with a Perl DBI dbh?