pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。
pg_prepared_xacts #视图pg_prepared_xacts显示当前准备进行两阶段提交的事务的信息 (详见PREPARE TRANSACTION)。
pg_prepared_xacts 为每个预备事务包含一行。事务提交或回滚时,对应条目会被移除。
表 45.59. 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 |
|
Name of the user that executed the transaction |
database |
name |
|
Name of the database in which the transaction was executed |
当访问pg_prepared_xacts视图时,内部事务管理器数据结构会被暂时锁定,并为视图制作一份副本用以显示。 这确保视图生成一致的结果集,同时不会不必要地阻塞正常操作。尽管如此,如果频繁访问该视图,可能会对数据库性能产生一些影响。
译文有误、术语不当或页面显示问题,请到译文仓库 pgsty/pgdoc 报告译文问题。 英文原文本身的问题,请在当前版本的对应页面向上游反馈;上游不再修订已结束维护的版本。