pg_replication_origin_status
是一个 系统目录 视图,显示特定来源的回放的近似状态。它基于底层的 系统目录 表 pg_replication_origin
。
pg_replication_origin_status
在 PostgreSQL 9.5 中添加。
按 PostgreSQL 版本定义
pg_replication_origin_status (PostgreSQL 17)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 16)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 15)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 14)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 13)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 12)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 11)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 10)
View "pg_catalog.pg_replication_origin_status" Column | Type | Collation | Nullable | Default -------------+--------+-----------+----------+--------- local_id | oid | | | external_id | text | | | remote_lsn | pg_lsn | | | local_lsn | pg_lsn | | |
pg_replication_origin_status (PostgreSQL 9.6)
View "pg_catalog.pg_replication_origin_status" Column | Type | Modifiers -------------+--------+----------- local_id | oid | external_id | text | remote_lsn | pg_lsn | local_lsn | pg_lsn |
pg_replication_origin_status (PostgreSQL 9.5)
View "pg_catalog.pg_replication_origin_status" Column | Type | Modifiers -------------+--------+----------- local_id | oid | external_id | text | remote_lsn | pg_lsn | local_lsn | pg_lsn |
更改历史记录
- PostgreSQL 9.5
- 添加 (提交 5aa23504).
pg_replication_origin_status
自从在 PostgreSQL 9.5 中添加以来就没有修改过。
示例
逻辑复制订阅者上 pg_replication_origin_status
的示例内容
postgres=# SELECT * FROM pg_replication_origin_status; local_id | external_id | remote_lsn | local_lsn ----------+---------------------------------------+------------+------------ 1 | pgl_app_app_provider_app_subscription | 7/56A6A80 | 3/5D7767A0 (1 row)
参考文献
- PostgreSQL 文档: pg_replication_origin_status