--- title: "pg_subscription_rel" id: catalog-pg-subscription-rel pg_version: "20devel" --- ## 52.60. pg_subscription_rel The catalog pg_subscription_rel stores the state of each replicated table and sequence for each subscription. This is a many-to-many mapping. This catalog contains tables and sequences known to the subscription after running: [`CREATE SUBSCRIPTION`](sql-createsubscription.md), [`ALTER SUBSCRIPTION ... REFRESH PUBLICATION`](sql-altersubscription.md#sql-altersubscription-params-refresh-publication), or [`ALTER SUBSCRIPTION ... REFRESH SEQUENCES`](sql-altersubscription.md#sql-altersubscription-params-refresh-sequences). **pg_subscription_rel Columns** | Column Type | Description | | --- | --- | | `srsubid` `oid` (references [pg_subscription](catalog-pg-subscription.md).`oid`) | Reference to subscription | | `srrelid` `oid` (references [pg_class](catalog-pg-class.md).`oid`) | Reference to table or sequence | | `srsubstate` `char` | State code for the table or sequence.
State codes for tables: `i` = initialize, `d` = data is being copied, `f` = finished table copy, `s` = synchronized, `r` = ready (normal replication)
State codes for sequences: `i` = initialize, `r` = ready | | `srsublsn` `pg_lsn` | Remote LSN of the state change used for synchronization coordination when in `s` or `r` states, otherwise null |