Help Center/ GaussDB/ Distributed_3.x/ Storage Engine/ Ustore/ Ustore Transaction Model
Updated on 2024-07-04 GMT+08:00

Ustore Transaction Model

GaussDB transaction basis:

  1. An XID is not automatically allocated when a transaction is started, unless the first DML/DDL statement in the transaction is executed.
  2. When a transaction ends, a commit log (CLOG) indicating the transaction commit state is generated. The states can be IN_PROGRESS, COMMITTED, ABORTED, or SUB_COMMITTED. Each transaction has two CLOG status bits. Each byte on the CLOG page indicates four transaction commit states.
  3. When a transaction ends, a commit sequence number (CSN) is generated, which is an instance-level variable. Each XID has its unique CSN. The CSN can mark the following transaction states: IN_PROGRESS, COMMITTED, ABORTED, or SUB_COMMITTED.