Community mailing list archives

Re: Odoo Performance and concurrency locks

by Olivier Dony <> - 09/15/2015 14:27:58
On 09/15/2015 11:13 AM, Alexandre Fayolle wrote:
> On 14/09/2015 23:17, Antony Lesuisse wrote:
> base_concurrency does not handle the longpolling bus. But it allows:
> 1. importing csv files in parallel
> 2. connecting as admin while long transactions are in progress (e.g. mrp
> on a large db, large CSV file import)
> Having these benefits natively in v9 would be great.

AFAICS, the only purpose of base_concurrency is to avoid login transactions 
grabbing exclusive locks on res.users rows, because of the potential conflicts 
with share locks via create_uid/write_uid FKs to res.users.

Avoiding those conflicts is exactly the purpose of the FOR KEY SHARE/FOR NO KEY 
UPDATE locking levels introduced in PG 9.3. So upgrading to PG9.3 gives the 
same result natively, with more benefits and performance included, and less 
hacky code... ;-)