> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lag and hold

Set the polling cadence with `lag` on the replica mount and the SQL log
retention budget with `hold` on its change receiver.

## Lag

`lag: "live"` (the default) schedules the replica's feed on a 1-second cadence.
A duration such as `lag: { seconds: 5 }` sets a slower cadence and lets each
landing commit more source changes at once, trading freshness for fewer
transactions. Commits are never reordered and never split.

A duration is a `Temporal.Duration` or its plain form, such as
`{ seconds: 5 }`, `{ minutes: 10 }` or `{ days: 7 }`.

## Large source transactions

Atomicity is strict only. Each source commit lands together with the advanced
cursor in one Bijection transaction, so readers never see part of a source
transaction.

If a single source commit exceeds one transaction's write or payload budget
(such as a bulk `UPDATE` across a large table), the change receiver reports a
`transaction_oversized` stop before advancing the position. Nothing of that
source commit is published. Break up oversized source updates or re-baseline
after the change passes.

## Hold

The hold is the source log retained for the replica: a PostgreSQL replication
slot's WAL, the MySQL or MariaDB binary log, SQL Server change tables or Oracle
archived redo logs between the replica's position and the source's head. `hold`
is the required budget on the SQL change receiver, as bytes (`"8GiB"`) or an age (a duration,
such as `{ hours: 24 }`). Sizes are written `"512MiB"`, `"8GiB"` or `"1TiB"`.

When a SQL page exceeds `hold`, the replica drops the page and its position
and records `lost`. A PostgreSQL replica then advances its slot to the current
WAL head. The replica builds a fresh baseline in private storage and replays
the source log before publishing the replacement cut. Reads return
`ReplicaUnavailable` during recovery. Advancing the slot can discard exact
events from the old interval.

Set the source's own retention (for example `max_slot_wal_keep_size` or
`binlog_expire_logs_seconds`) above the hold, so the source never discards log
the replica still needs. If it does, the receiver reports a continuity gap.
A full [rebaseline](https://docs.bijection.com/integrations/replica/status.md#rebaseline) is required to
resume current-state publication.

For an envelope replica, the mount takes `hold` (default `"8GiB"`) and
`onHold` (default `"release"`). The `"stop"` action retains the position
and reports `hold_exceeded`. The broker controls topic retention.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.