Skip to content

A Note on the Spock-Facing SQL

Only two functions in pg_relay actually read Spock's own internal catalogues (its bookkeeping tables): pgrelay._spock_all_nodes() and pgrelay._spock_live_nodes(). Their exact catalogue and replication-slot queries, and the mapping between a Spock node and pg_relay's own pg_relay.node_id setting, are best-effort, and must be validated against your specific Spock version before you rely on them in production.

Everything built on top of these two functions — ordering, reassignment, and the mode gate functions described throughout this book — is fully deterministic, and is covered by pg_relay's single-database regression tests.


Continue to Node-Restricted Channels, the last chapter in this book.