Readyset Docs
Configuration & SQL Support

System Views

Readyset exposes read-only system views under the readyset schema, queryable with plain SELECT statements. Use them to monitor a running deployment.

readyset.replication_status

Reports how far behind Readyset is relative to the upstream database's current replication position. A single row is returned.

SELECT * FROM readyset.replication_status;

Columns

ColumnTypeDescription
replication_modetextReplication protocol in use: postgres, mysql_file, or mysql_gtid.
upstream_offsettextThe upstream's current replication position. Format depends on replication_mode.
replicator_offsettextPosition of the most recent event Readyset has consumed from the stream.
persisted_offsettextPersistence frontier: the furthest position any base table has durably recorded.
consume_lagbigintBytes (Postgres, MySQL file-based) or transactions (MySQL GTID) between upstream_offset and replicator_offset. How far behind Readyset is in ingesting events.
persist_lagbigintSame units as consume_lag, between upstream_offset and persisted_offset. How far behind Readyset is in durably persisting events.
heartbeat_staleness_secondsdouble precisionWall-clock staleness in seconds. NULL when heartbeat is disabled.

Example output

 replication_mode | upstream_offset | replicator_offset | persisted_offset | consume_lag | persist_lag | heartbeat_staleness_seconds
------------------+-----------------+-------------------+------------------+-------------+-------------+-----------------------------
 postgres         | 0/1A3F2C8       | 0/1A3F200         | 0/1A3F1B0        |         200 |         280 |                       0.004

Notes

  • On a quiescent Postgres upstream, consume_lag and persist_lag report a small non-zero value (~288 bytes). This is a measurement artifact from the WAL record that the position query itself generates, not real lag.
  • When replication_mode is mysql_gtid, consume_lag and persist_lag are counts of transactions, not bytes.
  • heartbeat_staleness_seconds requires --replication-heartbeat to be enabled on the Readyset server, which in turn requires write access to the upstream so Readyset can maintain a small heartbeat table (readyset._heartbeat on Postgres, _readyset_heartbeat on MySQL). If write access is not granted, Readyset logs a warning, disables heartbeat, and the column reports NULL; the other columns are unaffected.
  • The poll cadence is controlled by --replication-lag-interval (default 1 second).

Required upstream privileges

  • Postgres: none beyond what replication already requires.
  • MySQL: REPLICATION CLIENT (already required for replication).
  • Heartbeat (optional, either dialect): write access to the upstream.