Zeos has problem for PostgreSQL disconnection (or when DB service is stopped) inside transaction. When this happens connection can't be connected/reconnected again in proper way (many internal errors). Patch attached.
Investigating the same problem I found a different solution: in the procedure TZPostgreSQLConnection.DeallocatePrepareStatements, in the call to CheckPostgreSQLError change the parameter lcExecute to lcUnprepStmt.
This way it won't raise an error in case the connection is dropped. Since I'm not familiar with the code I cannot say if it has any adverse side effect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
patches are welcome!
patch applied R4577 (testing-7.3)
@Luca,
nice too! Patch done R4579 (testing-7.3)
Note i'd change most of the code according the "deallocate" stuff yesterday. The original code was made because of PostrgreSQL oddly broken transaction state. Current code does check the error-code : "25P02" -> current_transaction_is_aborted on trying to deallocate the stmt. If the error code is given i add the planname to jan's trashbin-chain.
Please Close if ok. Cheers, Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Investigating the same problem I found a different solution: in the procedure TZPostgreSQLConnection.DeallocatePrepareStatements, in the call to CheckPostgreSQLError change the parameter lcExecute to lcUnprepStmt.
This way it won't raise an error in case the connection is dropped. Since I'm not familiar with the code I cannot say if it has any adverse side effect.
Hi Maciej,
patches are welcome!
patch applied R4577 (testing-7.3)
@Luca,
nice too! Patch done R4579 (testing-7.3)
Note i'd change most of the code according the "deallocate" stuff yesterday. The original code was made because of PostrgreSQL oddly broken transaction state. Current code does check the error-code : "25P02" -> current_transaction_is_aborted on trying to deallocate the stmt. If the error code is given i add the planname to jan's trashbin-chain.
Please Close if ok. Cheers, Michael