On 2/24/2016 10:08 AM, Stephen Chrzanowski wrote:
> IMO, all that, plus the fact that you have an easy roll back mechanism.
> Anything that needs to be put in the database is external to the pristine
> database.  Lock the database with a transaction, fill up the journal, the
> power goes out, your pristine database isn't touched.

Rollback journal works the other way round. New data is written to 
database file; previous content of overwritten pages is copied to 
journal file. Committing a transaction is fast - simply delete the 
journal. Rolling back (e.g. after power failure) means copying original 
pages from the journal back to the database file.

In the world you describe - how would you implement committing a 
transaction? At some point, something must write to the database file; 
at that point, the file is no longer "pristine". What happens if power 
goes out in the middle of this?

Note also that a typical application commits much more often than it 
rolls back, so the system should be designed to make the former fast; 
the latter can be slow.
-- 
Igor Tandetnik

Reply via email to