Community mailing list archives

community@mail.odoo.com

Re: Odoo Performance and concurrency locks

by Olivier Dony <odo@openerp.com> - 09/15/2015 14:04:30
On 09/14/2015 07:09 PM, Nhomar Hernández wrote:
> 2015-09-14 10:52 GMT-05:00 Olivier Dony :
>
>     2b. As of PG 9.3, you should not see TransactionRollbackErrors caused by
>     logins unless your transactions are actively updating user records
>     themselves. This should not happen much with the standard Odoo distribution.
>
> IMHO, it is happening to me in several environments variations, if you ar open
> to fix this i can prepare for you a set of use cases.

Sure, but be 100% sure to double-check your facts first. There are many 
perfectly valid reasons to get TransactionRollbackErrors in other places, and 
they're very easy to confuse on first sight.

The use of gapless sequences is a simple example where upgrading to PG9.3, 
changing the login code or using read-only transaction will not help a bit. 
This is PG ensuring the most basic ACID properties of database transactions, 
and the application *has to* retry the transaction [1]

Maybe we should just drop gapless sequences altogether.


[1] 
http://www.postgresql.org/docs/9.4/static/transaction-iso.html#XACT-REPEATABLE-READ