Re: How to "ping" the database

From: Bill Moseley <moseley(at)hank(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to "ping" the database
Date: 2005-08-17 20:32:59
Message-ID: 20050817203259.GA7702@hank.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 17, 2005 at 04:25:48PM -0400, Tom Lane wrote:
> Of course, this begs the question of what ping is really supposed to
> test and when it's supposed to be allowable. The above will not work
> if in the middle of retrieving a query result, for example.

Well, there's that. I'm not really sure why there's a need for a ping
-- and I've heard others question it, too.

Perl's DBI has a connect_cached() function that is suppose to return a
cached connection if it's still alive. So that is one place "ping" is
used. If ping fails then a new connection is created.

--
Bill Moseley
moseley(at)hank(dot)org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mario Guenterberg 2005-08-17 20:35:56 Re: postgres 8.x on debian
Previous Message Tom Lane 2005-08-17 20:31:14 Re: PostgreSQL 8.0.3 limiting max_connections to 64 ?