select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Supported versions: Current (18) / 17 / 16 / 15 / 14
Development versions: 19 / devel
Unsupported versions: 13 / 12 / 11 / 10
Pre-release documentation. PostgreSQL 19 Beta 3 is a testing release. The final release may differ.

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, ALTER SUBSCRIPTION ... REFRESH PUBLICATION, or ALTER SUBSCRIPTION ... REFRESH SEQUENCES.

Table 52.60. pg_subscription_rel Columns

Column Type

Description

srsubid oid (references pg_subscription.oid)

Reference to subscription

srrelid oid (references pg_class.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. For sequences, this instead holds the publisher sequence's page LSN as of the last synchronization, which does not track replication progress the way it does for tables; see Section 29.7.2 for how it is used to detect out-of-sync sequences.


Report a documentation issue

Read the upstream documentation. For corrections, first check the current version.