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
| Column | Type | Description |
|---|---|---|
replication_mode | text | Replication protocol in use: postgres, mysql_file, or mysql_gtid. |
upstream_offset | text | The upstream's current replication position. Format depends on replication_mode. |
replicator_offset | text | Position of the most recent event Readyset has consumed from the stream. |
persisted_offset | text | Persistence frontier: the furthest position any base table has durably recorded. |
consume_lag | bigint | Bytes (Postgres, MySQL file-based) or transactions (MySQL GTID) between upstream_offset and replicator_offset. How far behind Readyset is in ingesting events. |
persist_lag | bigint | Same units as consume_lag, between upstream_offset and persisted_offset. How far behind Readyset is in durably persisting events. |
heartbeat_staleness_seconds | double precision | Wall-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.004Notes
- On a quiescent Postgres upstream,
consume_lagandpersist_lagreport 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_modeismysql_gtid,consume_lagandpersist_lagare counts of transactions, not bytes. heartbeat_staleness_secondsrequires--replication-heartbeatto be enabled on the Readyset server, which in turn requires write access to the upstream so Readyset can maintain a small heartbeat table (readyset._heartbeaton Postgres,_readyset_heartbeaton MySQL). If write access is not granted, Readyset logs a warning, disables heartbeat, and the column reportsNULL; the other columns are unaffected.- The poll cadence is controlled by
--replication-lag-interval(default1second).
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.