Write Ahead Logging - Advanced SQL Engine - Teradata Database

Database Introduction

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
jiv1600056352873.ditamap
dita:ditavalPath
jiv1600056352873.ditaval
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata Vantageā„¢

Teradata Database uses a Write Ahead Logging (WAL) protocol. According to this protocol, writes of permanent data are written to a log file that contains the records representing updates. The log file is written to disk at key moments, such as at transaction commit.

Modification to permanent data from different transactions, all written to the WAL log, can also be batched. This achieves a significant reduction in I/O write operations. One I/O operation can represent multiple updates to permanent data.

The WAL Log is conceptually similar to a table, but the log has a simpler structure than a table. Log data is a sequence of WAL records, different from normal row structure and not accessible via SQL.

The WAL Log includes the following:

  • Redo Records for updating disk blocks and insuring file system consistency during restarts, based on operations performed in cache during normal operation.
  • Transient Journal (TJ) records used for transaction rollback.

WAL protects all permanent tables and all system tables, except Transient Journal (TJ) tables, user journal tables, and restartable spool tables (global temporary tables). Furthermore, WAL allows Teradata Database to be reconstructed from the WAL Log in the event of a system failure.

The file system stages in-place writes through a disk area called the DEPOT, a collection of cylinders. Staging in-place writes through the DEPOT ensures that either the old or the new copy is available after a restart.