Re: Re: pqReadData() - backend unexpectedly closed the channel - Mailing list pgsql-general

From Dirk Lutzebaeck
Subject Re: Re: pqReadData() - backend unexpectedly closed the channel
Date
Msg-id 15022.1717.687734.702521@ampato.core.aeccom.com
Whole thread Raw
In response to Re: pqReadData() - backend unexpectedly closed the channel  ("Rob Arnold" <rob@cabrion.com>)
List pgsql-general
Rob Arnold writes:
 > I can make this happen consistently with Perl DBI by placing a
 > $dbh->disconnect() in the DESTROY subroutine of an object.  I doubt the two
 > issues have much in common, but there's my $.02.  You might post to the list
 > (not me, I'm ignorant) how you managed to make this happen.

Yes, the same here. You must not does this as the described in DBI
manpage (last sentence):

           The database is automatically disconnected (by the
           DESTROY method) if still connected when there are no
           longer any references to the handle.  The DESTROY
           method for each driver should implicitly call rollback
           to undo any uncommitted changes. This is vital
           behaviour to ensure that incomplete transactions don't
           get committed simply because Perl calls DESTROY on
           every object before exiting. Also, do not rely on the
           order of object destruction during 'global
           destruction', it is undefined.

Dirk

pgsql-general by date:

Previous
From: z.nijmeyers@cable.a2000.nl
Date:
Subject: Re: postgresql to mysql conversion?
Next
From: Marko Kreen
Date:
Subject: Re: postgresql to mysql conversion?