pg_replication_origin_status

A system view showing the approximate state of replay for a certain origin

pg_replication_origin_status is a system catalogue view showing the approximate state of replay for a certain origin. It is based on the underlying system catalogue table pg_replication_origin.

pg_replication_origin_status was added in PostgreSQL 9.5.

Definition by PostgreSQL version

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 |           |          |
    

Documentation: pg_replication_origin_status

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 |           |          |
    

Documentation: pg_replication_origin_status

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 |           |          |
    

Documentation: pg_replication_origin_status

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 |           |          |
    

Documentation: pg_replication_origin_status

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 |           |          |
    

Documentation: pg_replication_origin_status

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 |           |          |
    

Documentation: pg_replication_origin_status

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 |
    

Documentation: pg_replication_origin_status

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 |
    

Documentation: pg_replication_origin_status

Change history

pg_replication_origin_status has not been modified since it was added in PostgreSQL 9.5.

Examples

Sample contents of pg_replication_origin_status on a logical replication subscriber:

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)

Categories

Logical replication, Replication, System catalogue

See also

pg_replication_origin