pg_replication_origin

存储所有创建的复制源的系统表

pg_replication_origin 是一个存储所有创建的复制源的系统目录表。

pg_replication_originPostgreSQL 9.5中添加。

此表在集群中的所有数据库之间共享。

系统目录视图pg_replication_origin_status提供了更用户友好的替代方案,并包含有关复制进度的其他数据。

按 PostgreSQL 版本定义

pg_replication_origin (PostgreSQL 17)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text | C         | not null | 
Indexes:
    "pg_replication_origin_roiident_index" PRIMARY KEY, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE CONSTRAINT, btree (roname), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 16)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text | C         | not null | 
Indexes:
    "pg_replication_origin_roiident_index" PRIMARY KEY, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE CONSTRAINT, btree (roname), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 15)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text | C         | not null | 
Indexes:
    "pg_replication_origin_roiident_index" PRIMARY KEY, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE CONSTRAINT, btree (roname), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 14)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text | C         | not null | 
Indexes:
    "pg_replication_origin_roiident_index" PRIMARY KEY, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE CONSTRAINT, btree (roname), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 13)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text | C         | not null | 
Indexes:
    "pg_replication_origin_roiident_index" UNIQUE, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE, btree (roname), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 12)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text | C         | not null | 
Indexes:
    "pg_replication_origin_roiident_index" UNIQUE, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE, btree (roname), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 11)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text |           | not null | 
Indexes:
    "pg_replication_origin_roiident_index" UNIQUE, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE, btree (roname text_pattern_ops), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 10)

    Table "pg_catalog.pg_replication_origin"
 Column  | Type | Collation | Nullable | Default 
---------+------+-----------+----------+---------
 roident | oid  |           | not null | 
 roname  | text |           | not null | 
Indexes:
    "pg_replication_origin_roiident_index" UNIQUE, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE, btree (roname text_pattern_ops), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 9.6)

Table "pg_catalog.pg_replication_origin"
 Column  | Type | Modifiers 
---------+------+-----------
 roident | oid  | not null
 roname  | text | not null
Indexes:
    "pg_replication_origin_roiident_index" UNIQUE, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE, btree (roname text_pattern_ops), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

pg_replication_origin (PostgreSQL 9.5)

Table "pg_catalog.pg_replication_origin"
 Column  | Type | Modifiers 
---------+------+-----------
 roident | oid  | not null
 roname  | text | not null
Indexes:
    "pg_replication_origin_roiident_index" UNIQUE, btree (roident), tablespace "pg_global"
    "pg_replication_origin_roname_index" UNIQUE, btree (roname text_pattern_ops), tablespace "pg_global"
Tablespace: "pg_global"
    

文档: pg_replication_origin

变更历史

自它在PostgreSQL 9.5中添加以来,此表没有被修改过。

示例

pg_replication_origin 的示例内容

postgres=# SELECT * FROM pg_replication_origin;
 roident |                  roname
---------+---------------------------------------
       1 | pgl_app_app_provider_app_subscription
(1 row)

分类

集群范围表复制系统目录

另请参见

pg_replication_origin_statuspg_replication_origin_create()pg_replication_origin_drop()pg_replication_origin_oid()

反馈

提交任何关于 "pg_replication_origin" 的评论、建议或更正 此处