pg_subscription_rel
是一个包含每个订阅中每个复制关系的状态的系统目录表。
pg_subscription_rel
在 PostgreSQL 10 中添加。
按 PostgreSQL 版本定义
pg_subscription_rel (PostgreSQL 17)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | | Indexes: "pg_subscription_rel_srrelid_srsubid_index" PRIMARY KEY, btree (srrelid, srsubid)
pg_subscription_rel (PostgreSQL 16)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | | Indexes: "pg_subscription_rel_srrelid_srsubid_index" PRIMARY KEY, btree (srrelid, srsubid)
pg_subscription_rel (PostgreSQL 15)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | | Indexes: "pg_subscription_rel_srrelid_srsubid_index" PRIMARY KEY, btree (srrelid, srsubid)
pg_subscription_rel (PostgreSQL 14)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | | Indexes: "pg_subscription_rel_srrelid_srsubid_index" PRIMARY KEY, btree (srrelid, srsubid)
pg_subscription_rel (PostgreSQL 13)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | | Indexes: "pg_subscription_rel_srrelid_srsubid_index" UNIQUE, btree (srrelid, srsubid)
pg_subscription_rel (PostgreSQL 12)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | not null | Indexes: "pg_subscription_rel_srrelid_srsubid_index" UNIQUE, btree (srrelid, srsubid)
pg_subscription_rel (PostgreSQL 11)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | not null | Indexes: "pg_subscription_rel_srrelid_srsubid_index" UNIQUE, btree (srrelid, srsubid)
pg_subscription_rel (PostgreSQL 10)
Table "pg_catalog.pg_subscription_rel" Column | Type | Collation | Nullable | Default ------------+--------+-----------+----------+--------- srsubid | oid | | not null | srrelid | oid | | not null | srsubstate | "char" | | not null | srsublsn | pg_lsn | | not null | Indexes: "pg_subscription_rel_srrelid_srsubid_index" UNIQUE, btree (srrelid, srsubid)
更改历史记录
自 PostgreSQL 10 中添加以来,此表未被修改。
- PostgreSQL 10
- 添加 (提交 7c4f5240)
参考文献
- PostgreSQL 文档: pg_subscription_rel
另请参阅
pg_subscription, pg_subscription_tables