选择 打开 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

受支持版本: 当前版本 (18) / 17 / 16 / 15 / 14
测试与开发版本: 19 / devel
不受支持的版本: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0
历史版本PostgreSQL 9.2 已于 2017 年 11 月结束社区维护,本页译文保留供仍在使用旧版本的读者参考。新系统请看当前版本

45.60. pg_prepared_xacts #

视图pg_prepared_xacts显示当前准备进行两阶段提交的事务的信息 (详见PREPARE TRANSACTION)。

pg_prepared_xacts 为每个预备事务包含一行。事务提交或回滚时,对应条目会被移除。

表 45.61. pg_prepared_xacts

Name Type References Description
transaction xid   Numeric transaction identifier of the prepared transaction
gid text   Global transaction identifier that was assigned to the transaction
prepared timestamp with time zone   Time at which the transaction was prepared for commit
owner name pg_authid.rolname Name of the user that executed the transaction
database name pg_database.datname Name of the database in which the transaction was executed

当访问pg_prepared_xacts视图时,内部事务管理器数据结构会被暂时锁定,并为视图制作一份副本用以显示。 这确保视图生成一致的结果集,同时不会不必要地阻塞正常操作。尽管如此,如果频繁访问该视图,可能会对数据库性能产生一些影响。

提交更正

译文有误、术语不当或页面显示问题,请到译文仓库 pgsty/pgdoc 报告译文问题。 英文原文本身的问题,请在当前版本的对应页面向上游反馈;上游不再修订已结束维护的版本。