Subject | Re: [firebird-support] Re: Questions on concurrent updates |
---|---|
Author | Ann W. Harrison |
Post date | 2007-06-14T22:32:31Z |
Sean wrote:
If transaction A changes a record and commits before transaction B
attempts to modify the same record, then theory and practice align
nicely.
If transaction A changes a record and transaction B attempts to
modify the same record before A commits, B waits for A and then
gets an error. That's why Helen's fine book says "usually".
It would, in principal (which is much more like theory than
practice) be possible to reposition transaction B so it modifies
the record that A committed rather than the previous version.
Firebird doesn't do that. Without that, read committed would
not only be unsafe for reading, it would also permit dirty
writes. Not a good thing at all.
Cheers,
Ann
> --- In firebird-support@yahoogroups.com, "Ann W. Harrison"In theory, nothing.
>
>
> I read from "The Firebird Book" p.511, "Read-committed transactions
> are usually allowed to post changes overwriting versions commited by
> newer transactions." What's the difference between theory and practice?
>
If transaction A changes a record and commits before transaction B
attempts to modify the same record, then theory and practice align
nicely.
If transaction A changes a record and transaction B attempts to
modify the same record before A commits, B waits for A and then
gets an error. That's why Helen's fine book says "usually".
It would, in principal (which is much more like theory than
practice) be possible to reposition transaction B so it modifies
the record that A committed rather than the previous version.
Firebird doesn't do that. Without that, read committed would
not only be unsafe for reading, it would also permit dirty
writes. Not a good thing at all.
Cheers,
Ann