トランザクションの隔離

7) The ANSI/ISO SQL standard defines four levels of transaction isolation in terms of three phenomena that must be prevented between concurrent transactions. These undesirable phenomena are:

ANSI/ISO SQL 規格は,同時に実行されるトランザクション間で防ぐべき三つの現象ごとに, トランザクション隔離のレベルを4レベルに分けて定義しています. 三つの望ましくない現象とは:

ダーティ・リード

9) A transaction reads data written by concurrent uncommitted transaction.

同時に実行されている,まだコミットされていないトランザクションが書き込んだ データを読み込んでしまう.

繰り返し不可能な読み込み

11) A transaction re-reads data it has previously read and finds that data has been modified by another committed transaction.

トランザクションが過去に読み込んだデータをもう一度読み込もうとしたとき, コミットされた他のトランザクションによって書き換えられたデータを得てしまう.

ファントム・リード(幽霊)

13) A transaction re-executes a query returning a set of rows that satisfy a search condition and finds that additional rows satisfying the condition has been inserted by another committed transaction.

トランザクションが,ある行の集合を返す検索条件で問い合わせを再実行したとき, 他のコミットされたトランザクションが,その問い合わせ条件を満たしてしまう (以前は存在しなかった)行を挿入していた.

14) The four isolation levels and the corresponding behaviors are described below.

四つの隔離レベルと,対応する動作は以下のようになります.

Table 10-1. Postgres トランザクション隔離レベル

  ダーティ・リード 繰り返し不可能な読み込み ファントム・リード
リードアンコミッティド (コミットされていない読み込み) 起こり得る 起こり得る 起こり得る
リードコミッティド (コミットされた読み込み) 起きない 起こり得る 起こり得る
リピータブルリード (繰り返し可能な読み込み) 起きない 起きない 起こり得る
シリアライザブル (逐次化可能) 起きない 起きない 起きない
23) Postgres offers the read committed and serializable isolation levels. Postgres は リードコミッティドレベルと,シリアライザブルレベルのふたつの 隔離レベルを備えています.