diff --git a/trytond/backend/postgresql/database.py b/trytond/backend/postgresql/database.py index b476a33344..8c1d650724 100644 --- a/trytond/backend/postgresql/database.py +++ b/trytond/backend/postgresql/database.py @@ -356,7 +356,7 @@ class Cursor(CursorInterface): return self.cursor.fetchone()[0] def lock(self, table): - self.cursor.execute('LOCK "%s" IN EXCLUSIVE MODE' % table) + self.cursor.execute('LOCK "%s" IN EXCLUSIVE MODE NOWAIT' % table) def has_constraint(self): return True