pg_stat_subscription

显示逻辑复制订阅的统计视图

pg_stat_subscription 是一个显示逻辑复制订阅的统计视图

pg_stat_subscriptionPostgreSQL 10 中添加。

按 PostgreSQL 版本定义

pg_stat_subscription (PostgreSQL 17)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 worker_type           | text                     |           |          | 
 pid                   | integer                  |           |          | 
 leader_pid            | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

pg_stat_subscription (PostgreSQL 16)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 pid                   | integer                  |           |          | 
 leader_pid            | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

pg_stat_subscription (PostgreSQL 15)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 pid                   | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

pg_stat_subscription (PostgreSQL 14)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 pid                   | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

pg_stat_subscription (PostgreSQL 13)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 pid                   | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

pg_stat_subscription (PostgreSQL 12)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 pid                   | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

pg_stat_subscription (PostgreSQL 11)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 pid                   | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

pg_stat_subscription (PostgreSQL 10)

                      View "pg_catalog.pg_stat_subscription"
        Column         |           Type           | Collation | Nullable | Default 
-----------------------+--------------------------+-----------+----------+---------
 subid                 | oid                      |           |          | 
 subname               | name                     |           |          | 
 pid                   | integer                  |           |          | 
 relid                 | oid                      |           |          | 
 received_lsn          | pg_lsn                   |           |          | 
 last_msg_send_time    | timestamp with time zone |           |          | 
 last_msg_receipt_time | timestamp with time zone |           |          | 
 latest_end_lsn        | pg_lsn                   |           |          | 
 latest_end_time       | timestamp with time zone |           |          |
    

文档: pg_stat_subscription

更改历史记录

示例

pg_stat_subscription 的示例内容

postgres=# SELECT * FROM pg_stat_subscription;
-[ RECORD 1 ]---------+------------------------------
subid                 | 16404
subname               | test_subscription
pid                   | 6436
relid                 | 
received_lsn          | 0/14ED8B8
last_msg_send_time    | 2021-11-24 16:02:04.801319+01
last_msg_receipt_time | 2021-11-24 16:02:04.801549+01
latest_end_lsn        | 0/14ED8B8
latest_end_time       | 2021-11-24 16:02:04.801319+01

分类

逻辑复制统计/监控视图

另请参阅

pg_stat_subscription_statspg_subscription

反馈

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