perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Poo R." <h...@opensource.cl>
Subject Transactions corruption and persistent connections
Date Wed, 05 May 2004 17:01:03 GMT
Hi all

I'am using mod_perl-1.27, apache 1.3.28, Linux RedHat 9 and postgresql 7.4.2.

I want to know, if it's necessary to rollback database connections on each
request arrive with a PerlInitHandler, when using persistent database connections.

This is the way i'am doing now (rolling back manually) in order to clean the
transaction asociated to the connection, this is for the case where due to an
abnormal situation a transaction get aborted but not rolled back, and some sql
commands get in the middle.

The side effect of this manual rollback is that the error_log get filled with
the message:

Issuing rollback() for database handle being DESTROY'd without explicit
disconnect() 

I think that using this technique i'am losing the gain of persistence, but in
ther other side avoid corruption of transactions.

Finally, i allways use the next settings on DBI: RaiseError = 1 and AutoCommit
= 0. That means i commit manually when transactions are succesfull.


Thanks.
Hans Poo, Chile




-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message