Perl + Determine active connections on Pg 8.0.x and Pg 8.2.x

From: "CAJ CAJ" <pguser(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Perl + Determine active connections on Pg 8.0.x and Pg 8.2.x
Date: 2007-05-21 17:35:26
Message-ID: 467669b30705211035p6ae3bb96h95f608ac16f31fe2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

We have Pg 8.0.x and Pg 8.2.x on 2 separate Linux servers. We have a perl
script (perl 5.8.7, DBI-1.48/DBD::Pg-1.49) that connects to each database to
determine if there are active connections.with the following query.
SELECT count(*) from pg_stat_activity;

The above query always returns 0 rows for Pg 8.0.x and 1 row for Pg 8.2.x.

When we connect to the database using psql client, the above query returns 1
row for both the databases.

Does anyone has an idea what could be the issue? Is there any other way to
determine active connections in the database?

Thanks for all the help!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-05-21 17:44:45 Re: Perl + Determine active connections on Pg 8.0.x and Pg 8.2.x
Previous Message Philippe Amelant 2007-05-21 17:32:10 Postgresql 8.2.4 crash with tsearch2