Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] problem with postgres

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Raphael Hertzog <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-dev] problem with postgres
  • Date: Thu, 30 Sep 1999 17:13:58 +0200

Le Thu, Sep 30, 1999 at 03:44:52PM +0200, Olivier LACROIX écrivait:
> But if the postgres daemon (postmaster) is stopped and restarted, the
> problem
> appears again.
>
> Is this problem exist only with postgres ?

Certainly not. I have no patch but I suggest that you use the ping method
from DBI in order to check if the connection is still good :

ping

$rc = $dbh->ping;

Attempts to determine, in a reasonably efficient way,
if the database server is still running and the
connection to it is still working. Individual drivers
should implement this function in the most suitable
manner for their database engine.

The default implementation currently always returns
true without actually doing anything. Actually it
returns "0E0" which is true but zero. That way you can
tell if the return value is genuine or just the
default.

Very few applications would have any use for this
method. See the specialist Apache::DBI module for one
example usage.


Cheers,
--
Raphaël Hertzog >> 0C4CABF1 >> http://tux.u-strasbg.fr/~raphael/
<pub> CD Debian : http://tux.u-strasbg.fr/~raphael/debian/#cd </pub>



Archive powered by MHonArc 2.6.19+.

Top of Page