Author: Adam Leszczyński <aleszczynski@bersler.com>, version: 1.9.0, date: 2026-02-17 |
Previous chapter: Startup
Checkpointing saves the current position in the redo log. The redo log is organized by Log Writer Number (LWN). Each LWN contains a sequence of blocks that are processed as a unit. The position advances only after the whole LWN is processed.
After every LWN is processed, OpenLogReplicator emits a checkpoint record. The checkpoint record contains the current position in the redo log.
An example checkpoint record:
"payload":[{"op":"chkpt","seq":1763,"offset":15872}]
Checkpoint records also serve as a heartbeat and are enabled by default.
You can disable checkpoint records by setting the flags field of the reader (value 4096).
The record contains information about the current sequence of the redo log files (seq) and the offset in the current file (offset).
Sometimes it also contains information about the fact that the redo log file has been switched ("redo":true).
Using the checkpoint records is the best way of verifying that the replication is working properly. The database writes LWNs every few seconds, so the checkpoint records are emitted every few seconds as well. In case of any problems, the checkpoint records would stop being emitted.
The SCN value present in the checkpoint record is used as a checkpoint SCN. When OpenLogReplicator is restarted, it starts from the last checkpoint SCN. Transactions which have commit SCN lower than the checkpoint SCN aren’t processed.
Next chapter: Advanced topics