Subject Re: [Firebird-Architect] "Write Committed" transaction mode
Author Ann W. Harrison
On 11/30/2010 12:23 PM, Dmitry Yemanov wrote:
> Ann,

> Sorry, but I cannot find a confirmation there. Exactly the opposite:

You are absolutely right. I read that item too quickly and can no
longer find the article I read previously that made me think PostgreSQL
worked like InnoDB.

When executing a select for update, update, or delete with a where
clause that affects records other than the direct target, InnoDB
takes a record lock on all records it reads. So, if for example you
have a delete that looks like this

delete from employees
where salary < select avg(x.price) from x in cars

the statement blocks updates to some employees and all cars.

Best regards,