Forced writes

<< FLOAT | IBExpert Glossary | Foreign key >>

This enables the forced writing mode on disk. If the Forced writes option is selected all data is saved immediately to disk, i.e. every time a commit is made everything is written to the hard drive, and then to the TIP (=Transactions Inventory Page).

Without forced writes the process is minimally quicker, but when working on a Windows platform, Windows decides what should be saved to file, where and when, and the data pages are saved to file last i.e. the TIP changes are written first, and then the data sets - which could possibly lead to inconsistencies, particularly if it crashes during the process, as the TIP thinks all data sets have been written to file when they are in fact incomplete. The Windows cache simply starts at the beginning and works through to the end.

The Firebird Forced Writes mechanism writes the data where it needs it, for example, if it needs to open a new data page to write data into, it makes the necessary note in the contents that this page contains data for the table concerned, and also makes a note in the primary pointer pages for the table itself. Finally, when everything has successfully committed an entry is made in the TIP of what has been done and that it has been committed.

Using forced writes is therefore always recommended, and should never be deactivated unless really necessary.

See also:
Disabling forced writes
Forced writes - cuts both ways
Database sweep
Structure of a header page
Firebird 2.1 Release Notes: Forced Writes on Linux
Firebird Database Housekeeping Utility: Database write mode
Firebird Internals

back to top of page
<< FLOAT | IBExpert Glossary | Foreign key >>