Summary
pg_stat_subscription is a PostgreSQL statistics view. Its columns are documented below; see the linked PostgreSQL documentation for the full narrative description.
Columns
The pg_stat_subscription statistics view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
subidoid
OID of the subscriptionsubnamename
Name of the subscriptionworker_typetext
Type of the subscription worker process. Possible types are apply, parallel apply, table synchronization, and sequence synchronization.pidinteger
Process ID of the subscription worker processleader_pidinteger
Process ID of the leader apply worker if this process is a parallel apply worker; NULL if this process is a leader apply worker or a table synchronization workerrelidoid
OID of the relation that the worker is synchronizing; NULL for the leader apply worker and parallel apply workersreceived_lsnpg_lsn
Last write-ahead log location received, the initial value of this field being 0; NULL for parallel apply workerslast_msg_send_timetimestamp with time zone
Send time of last message received from origin WAL sender; NULL for parallel apply workerslast_msg_receipt_timetimestamp with time zone
Receipt time of last message received from origin WAL sender; NULL for parallel apply workerslatest_end_lsnpg_lsn
Last write-ahead log location reported to origin WAL sender; NULL for parallel apply workerslatest_end_timetimestamp with time zone
Time of last write-ahead log location reported to origin WAL sender; NULL for parallel apply workers
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_stat_subscription.