pg_stat_subscription
A statistics view showing logical replication subscriptions
pg_stat_subscription
is a statistics view showing logical replication subscriptions.
pg_stat_subscription
was added in PostgreSQL 10.
Definition by PostgreSQL version
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 | | |
Documentation: 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 | | |
Documentation: 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 | | |
Documentation: 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 | | |
Documentation: 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 | | |
Documentation: 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 | | |
Documentation: pg_stat_subscription
Change history
- PostgreSQL 10
- added (commit 665d1fad)
Examples
Example contents for 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
References
- PostgreSQL documentation: pg_stat_subscription