STL_UNDONE
显示有关已撤消的事务的信息。
此视图对所有用户可见。超级用户可以查看所有行;普通用户只能查看其自己的数据。有关更多信息,请参阅系统表和视图中的数据可见性。
表列
| 列名称 | 数据类型 | 描述 |
|---|---|---|
| userid | integer | 生成该条目的用户 ID。 |
| xact_id | bigint | 已撤消事务的 ID。 |
| xact_id_undone | bigint | 已撤消的事务的 ID。 |
| undo_start_ts | timestamp | 已撤消事务的开始时间。 |
| undo_end_ts | timestamp | 已撤消事务的结束时间。 |
| table_id | bigint | 受已撤消事务影响的表的 ID。 |
示例查询
要查看所有已撤消事务的简明日志,请键入以下命令:
select xact_id, xact_id_undone, table_id from stl_undone;
此命令返回以下示例输出:
xact_id | xact_id_undone | table_id ---------+----------------+---------- 1344 | 1344 | 100192 1326 | 1326 | 100192 1551 | 1551 | 100192 (3 rows)