> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 包含当前服务器上执行的所有事务的信息。
可随时对该表执行 TRUNCATE 或 DROP 操作，均可安全进行。

# system.transactions_info_log

## Description

包含当前服务器上已执行的所有事务的信息。

**可用性**

只有当服务器配置中包含 `transactions_info_log` 配置段时，才会创建 `system.transactions_info_log`。此外，还必须通过 `allow_experimental_transactions` 启用事务，该表才会累积行。若缺少该日志配置段，针对该表的查询会失败并返回 `UNKNOWN_TABLE`；若未启用 experimental 事务，则已配置的表会始终为空。

```xml theme={null}
<clickhouse>
    <allow_experimental_transactions>1</allow_experimental_transactions>
    <transactions_info_log>
        <database>system</database>
        <table>transactions_info_log</table>
        <partition_by>toYYYYMM(event_date)</partition_by>
        <flush_interval_milliseconds>7500</flush_interval_milliseconds>
    </transactions_info_log>
</clickhouse>
```

随时都可以安全地对该表执行 TRUNCATE 或 DROP 操作。

## Columns

* `hostname` ([LowCardinality(String)](/zh/reference/data-types/lowcardinality)) — 执行该事务的主机名。
* `clickhouse_version` ([LowCardinality(String)](/zh/reference/data-types/lowcardinality)) — 生成该行的 ClickHouse 服务器版本。
* `system_processor` ([LowCardinality(String)](/zh/reference/data-types/lowcardinality)) — 生成该行的 ClickHouse 服务器的 CPU 架构。
* `type` ([Enum8('Begin' = 1, 'Commit' = 2, 'Rollback' = 3, 'AddPart' = 10, 'LockPart' = 11, 'UnlockPart' = 12)](/zh/reference/data-types/enum)) — 事务类型。可能的值：Begin、Commit、Rollback、AddPart、LockPart、UnlockPart。
* `event_date` ([Date](/zh/reference/data-types/date)) — 记录的日期。
* `event_time` ([DateTime64(6)](/zh/reference/data-types/datetime64)) — 记录的时间
* `thread_id` ([UInt64](/zh/reference/data-types/int-uint)) — 线程标识符。
* `query_id` ([String](/zh/reference/data-types/string)) — 在事务范围内执行的查询 ID。
* `tid` ([Tuple(UInt64, UInt64, UUID, Int64)](/zh/reference/data-types/tuple)) — 事务标识符。
* `tid_hash` ([UInt64](/zh/reference/data-types/int-uint)) — 该标识符的哈希值。
* `csn` ([UInt64](/zh/reference/data-types/int-uint)) — 提交序列号
* `database` ([String](/zh/reference/data-types/string)) — 执行该事务所针对的数据库名称。
* `table` ([String](/zh/reference/data-types/string)) — 执行该事务所针对的表名称。
* `uuid` ([UUID](/zh/reference/data-types/uuid)) — 执行该事务所针对的表的 UUID。
* `part` ([String](/zh/reference/data-types/string)) — 参与该事务的分片名称。
