[Devel] postgres problem - request for comments

Klaus Darilion klaus.mailinglists at pernau.at
Tue Sep 13 14:52:22 CEST 2005


Hi!

I discovered a problem in the postgres module. Every 
insert/update/delete will be done in a transaction:

   1. begin_transaction
   2. submit_query
   3. commit_transaction

If the query fails, the commit is never sent to postgres (nor a 
rollback). thus the transaction is still running and the next time the 
database connection is used, the begin_transaction fails nad a new db 
connection will be established.

There are 2 solutions:

- fetch the error in submit_query and send a rollback

- remove the transaction: no begin_transaction and commit_transaction,
   only a submit_query

As there is always only one query in the transaction I might be safe to 
remove the transaction stuff (as in the mysql module)

regards
klaus



More information about the Devel mailing list