> ## 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.

# Status and rebaseline

A mounted replica stores its status in ordinary fact tables under its mount
(`sync.feeds`, `replica` and `tables`) and exposes `status`,
`inspect`, `pause`, `resume` and `rebaseline`. Call them at the replica's
mount `<path>` with `bijection query` and `bijection mutate`, like any other
function.

## Status

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection query warehouse.status --format json
```

`<path>.status` (allowed to the mount's `operator` and `readers` roles)
reports `{ state, lag, position, gap, stop, hold, tables, lastProbe }`:

| Replica state | Meaning |
| - | - |
| `live` | Active and reading changes |
| `idle` | Paused or waiting for the first pass |
| `baselining` | Building or catching up a SQL baseline |
| `stopped` | An envelope replica hit its `"stop"` budget, a transaction was oversized, continuity was lost, or a table stopped |
| `lost` | The replica exceeded its hold budget and is recovering |

| Table state | Meaning |
| - | - |
| `baselining` | Reading its baseline, with the number of rows scanned in `progress.done` |
| `catching_up` | Scanned its rows and waiting for replay and cut publication |
| `live` | Every change is published as it is read |
| `stopped` | Stopped by a breaking change; `stop` says why |

`hold` reports retained bytes (when the dialect reports them), the configured
budget, `onHold`, and `lost`. You can watch `<path>.status` from any client or
inspect the three fact tables directly in the data browser.

For SQL, `position` is the last published cut. During recovery it can refer
to an older cut while application reads are unavailable. `gap` keeps the
rejected position and detection time, and `stop` keeps the replica-wide stop
code and message. `sync.feeds` tracks the working cursor during recovery.

## Baselines

A SQL baseline is read into private keyed tables in bounded chunks through
the receiver's `baseline` request. The replica keeps its replay start and
the scan's reported high positions. It selects the rebuilt tables together
with the publication cursor once replay finishes a pass and covers the scans.
The normal SQL read entry points return `ReplicaUnavailable` until that
transaction commits.

Oracle LogMiner baselines use Oracle Flashback Query at one SCN. Partition
a table by adding `baselinePartition: { column: "BUCKET", splits: ["1000000", "2000000"] }`
to its declaration. Use a `NUMBER` column and one or two increasing signed
64-bit integer split points as decimal strings. The receiver reads the
resulting ranges and NULLs in parallel. The declared row key orders each range.
Every page resumes at the same SCN, and LogMiner reads commits after that SCN
once the baseline completes. Grant the common login `SET CONTAINER` and
`SELECT` and `FLASHBACK` on the table in the target PDB. Keep undo and
archived redo available until the baseline finishes.

## Rebaseline

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection mutate warehouse.rebaseline table=orders
```

For a SQL replica, `<path>.rebaseline({ table })` rebuilds that table and
its group. It reuses the shared log position and fences replies from the
previous pass. The rebuild clears and fills the inactive storage slot in
batches. A retry can reuse that slot after clearing it again. A paused
replica begins the build when resumed.

Use `table:=null` after a replica-wide stop, such as a source `TRUNCATE`, or
a lost log position. This rebuilds every table from a new replay start.
A recorded gap stays visible until the replacement cut is published.
Rebaseline reconstructs current state and resumes change delivery from
the replacement cut. Changes in a discarded or expired log interval are
unavailable as exact events.

## Inspect

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection mutate warehouse.inspect
bijection query warehouse.status --format json
```

`<path>.inspect` submits a read-only probe against the source. Its result is
`lastProbe` in `<path>.status`: the problems, keyless tables and setup SQL, and
each source table's key and fields. Copy those keys and fields into the
matching `replica(dialect, { tables })` declaration; which tables are
replicated, their sources, labels, indexes and groups stay as you wrote them.
Neither call writes to the source.

## Pause and resume

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection mutate warehouse.pause
bijection mutate warehouse.resume
```

`<path>.pause` and `<path>.resume` pause and resume the replica. A paused replica keeps its position
and hold; the source keeps retaining log against the hold budget while paused.

## Operator console edits

Direct operator edits to replica tables refuse `Forbidden`. Correct the row at
the source so the replica applies the change.

## Add or remove tables

After changing a SQL publication's table declarations, use a full rebaseline
for the new publication. Receiver identity or retention changes can require a
full rebaseline even when the request names one group.


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