DBD::Pg returns "DBD::Pg::st execute failed: connection not open" - Mailing list pgsql-interfaces

From Thomas Adam
Subject DBD::Pg returns "DBD::Pg::st execute failed: connection not open"
Date
Msg-id 18071eea0801300756m7d1d2273n16ffb2323f2998a3@mail.gmail.com
Whole thread Raw
Responses Re: DBD::Pg returns "DBD::Pg::st execute failed: connection not open"  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-interfaces
Hello all,

I'm having an odd issue and was wondering if someone could point me in
the right direction.  I hope this is also on the correct list.  If
not, let me know.

I'm using Perl 5.8.8 with DBD-Pg-1.49.  I have a perl script which
periodically inserts information into a database.  All of this has
been working fine for ages.  But very recently, and for some unknown
reason, my script stops working, the error being:

DBD::Pg::st execute failed: connection not open

I had previously set DBI->trace(4) and found out that my script was
able to connect just fine to the database, and perform SELECT queries,
but as soon as it came to running an INSERT query, the script
segfaults [1].

Now, at this point, I am confused.  I know, because I have tested it
on another machine, that the data in question works just fine.
Neither, does this issue seem to revolve around the data, as far as I
can work out, this "error" is completely intermittent.  But as soon as
it happens, it's fatal.  Even after I clean out the postgres database
(i.e., delete all the files pertaining to that database) and rebuild
it, the error still remains.

This does suggest to me that there's some weird interaction between
the DBD-Pg libraries and the underlying C code?  Has anyone got any
idea what might be going on?  The closest piece of information I have
is in this post:

http://archives.postgresql.org/pgsql-general/2000-02/msg00205.php

Although unlike him, I am actually able to perform SELECT/INSERT
queries via psql after this "connection not open" error just fine ---
which does suggest to me more that something is amiss with the DBD-Pg
<-> C interaction somewhere.

Can anyone shed any light on this?   If you need further information,
don't hesitate to ask, and I'll see what I can do.

Kindly,

Thomas Adam

[1]  Well, the *perl* does, at any rate.  Whether or not it's the
postgres daemon which kicks it out, or the client itself is unclear.
I'm going to guess the client, since the daemon still runs.


pgsql-interfaces by date:

Previous
From: Markus Schiltknecht
Date:
Subject: Re: Is there an interface that...
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: DBD::Pg returns "DBD::Pg::st execute failed: connection not open"