16.10 - Write Ahead Logging (WAL) - Teradata Database

Teradata Database Support Utilities

Teradata Database
June 2017

WAL is a log-based file system recovery scheme in which modifications to permanent data are written to a log file, the WAL log. The log file contains change records (Redo records) which represent the updates. At key moments, such as transaction commit, the WAL log is forced to disk. In the case of a reset or crash, Redo records can be used to transform the old copy of a permanent data block on disk into the version that existed in memory at the time of the reset.

By maintaining the WAL log, the permanent data blocks that were modified no longer have to be written to disk as each block is modified. Only the Redo records in the WAL log must be written to disk. This allows a write cache of permanent data blocks to be maintained.

WAL protects all permanent tables and all system tables but is not used to protect the Transient Journal (TJ), since TJ records are stored in the WAL log. WAL also is not used to protect spool or volatile tables.

The WAL log is maintained as a separate logical file system from the normal table area. Whole cylinders are allocated to the WAL log, and it has its own index structure.

The WAL log data is a sequence of WAL log records and includes the following:

  • Redo records, used for updating disk blocks and insuring file system consistency during restarts.
  • TJ records used for transaction rollback.

The WAL log is subject to many of the same problems as the normal file system, such as data corruption from hardware, software, and operational problems. The Filer utility provides special diagnostic startup options and commands that can display and modify the WAL log and its index, and can be used by support personnel to repair such problems.