Hi,
Let’s say we have users concurrently performing the following queries
inside a transaction (example taken directly from PostgreSQL site):
User A:
BEGIN;
UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
…
COMMIT;
User B:
BEGIN;
…
UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
…
COMMIT;
Am I right assuming that in case of PostgreSQL the UPDATE query of User
B would be working with an updated version of the accounts row, whereas
in case of MySQL it would update the original one?
If I use rails’ optimistic locking feature, I would ensure
database-independent behaviour, but would have to implement the
handling of rolled-back transactions on my own, right?
Are there any best practices for concurrency control with rails out
there?
I am quite new to this subject, so please bear with me in case I am
being ignorant 
Thanks in advance,
Alexei
