Skip to content
← All articles
Fundamentals·7 min read

What is transaction log processing (and why it matters)

Your analytics dashboard says "last synced: 6 hours ago." Your search index still shows products that sold out this morning. A downstream service is making decisions with yesterday's data.

The source database is current. Its copies are not.

Database engines already record changes for recovery, replication, or both. PostgreSQL has WAL. MySQL uses an InnoDB redo log for crash recovery and a binary log for replication and point-in-time recovery. MongoDB replica sets have an oplog, while WiredTiger uses a journal for recovery.

Those logs have different formats, positions, retention rules, and access methods. Transaction log processing reads or archives the appropriate log and moves its information through a controlled path.


What is a transaction log?

A transaction log is an ordered sequence of records that a database uses to recover or propagate state changes. Some engines use one log for several jobs. Others split recovery and replication across separate logs.

PostgreSQL uses write-ahead logging. It must flush the WAL records needed to recover a changed data page before it writes that page to the data files. With the default synchronous_commit = on, PostgreSQL also waits for the transaction's WAL records to reach durable local storage before reporting a successful commit.

Write-ahead pattern: a database modifies a page in memory, creates its recovery record, makes the record durable, and can then write the related data page

If PostgreSQL stops after the WAL flush but before the data-page write, recovery replays WAL to restore the page. A lost client response does not prove that the transaction failed; the server may have committed it before the connection disappeared.

The other engines use different log arrangements:

  • MySQL writes InnoDB redo records for crash recovery. Its binary log supports replication and recovery after a backup. The binary log can use statement, row, or mixed format. Row-based events are the usual input for row-level CDC.
  • MongoDB uses the WiredTiger journal for recovery between checkpoints. Replica-set members copy operations from the oplog. Oplog operations are idempotent, and applications normally consume changes through change streams. Change streams require a replica set or sharded cluster.
  • SQL Server records transactions and their database changes in its transaction log. Oracle Database records changes in redo logs and applies them during recovery.

For a closer comparison of these logs, see WAL, binlog, and oplog.


What is transaction log processing?

Transaction log processing turns native log data into work outside the source database. Remac separates that work into two modes.

The logical path decodes selected committed changes into typed events. Those events can feed streams, replicas, audit records, and replay archives.

The physical path preserves native log bytes or files in the source engine's format. It supports database-native archival and full-cluster recovery. Logical and physical positions remain separate because their bytes and recovery rules are not interchangeable.

The source adapter owns the database-specific log format, position type, value rules, and recovery behavior. The rest of the processor works with a common contract.

Change Data Capture. Decode selected committed inserts, updates, and deletes, then send them continuously to configured sinks.

Logical replication. Apply selected decoded changes to another database using the same engine so the target row state converges with the source.

Heterogeneous replication. Map selected changes into the types and schema of a different database engine before applying them.

Audit logging. Store selected changes with the available operation, row, source position, time, and transaction context.

Point-in-time recovery. Restore a compatible cluster from a physical base backup and native log. Remac also supports logical reconstruction of selected state from an event archive; that path is separate from database-native physical PITR.

REDO and event replay. Send archived logical events through configured sinks to rebuild or repair downstream state. Remac's REDO feature is event replay, not the REDO phase a database performs during crash recovery.

Remac runs these functions through one operating layer and reliability contract while keeping logical and physical positions separate.


Why process the log?

Scheduled polling works when downstream systems can tolerate the delay and the source has a reliable cursor. Late updates, deletes, tied timestamps, and multi-table transactions make polling harder to reason about.

An hourly batch can leave a target almost an hour behind before job runtime is counted. Querying only rows that still exist cannot reveal a deletion. A table-by-table poll also loses the source transaction boundary unless the application records it elsewhere.

Log-based processing can avoid repeated table scans and retain deletes, source positions, and transaction context. It is not free. Replication slots or retained logs require monitoring, and the processor consumes network, storage, and compute resources. Delivery completeness still depends on source configuration, retention, selected operations, and sink behavior.

A search index should remove a sold-out product soon after the source commit. A fraud system should evaluate the second transaction while the first is still relevant.


How Remac processes transaction logs

Logical and physical modes

Logical decoding converts source log information into structured changes that a processor can filter, transform, and route. Remac's PostgreSQL source uses pgoutput, PostgreSQL's standard logical-decoding output plugin. Future source adapters own their native mechanisms, such as row-based binlog parsing or MongoDB change streams.

Physical processing copies or archives native log bytes without turning them into row events. Those bytes remain bound to the source engine's format and compatibility rules.

The required output and recovery target determine which mode a Stream uses. Some deployments need both, but each mode keeps its own position and recovery state.

A logical change event

An email update can become an event like this:

{
  "operation": "UPDATE",
  "database": "accounts",
  "schema": "public",
  "table": "users",
  "position": "0/16B6A50",
  "timestamp": "2026-06-10T14:30:22Z",
  "transaction_id": "8842",
  "before": { "id": 42, "email": "alice@old.com" },
  "after": { "id": 42, "email": "alice@new.com" }
}

The event is illustrative. Available fields depend on the source and its configuration. In PostgreSQL, a complete old row for an update requires REPLICA IDENTITY FULL; the default replica identity normally exposes only key information when an old tuple is required.

The transaction identifier groups changes from one source transaction. Separate destination writes remain independent unless the destination protocol provides an atomic boundary.

Between capture and delivery

A processor may filter events, transform fields, form batches, apply backpressure, retry failed writes, save durable progress, and wait for destination acknowledgments. Each step changes when the source can safely release retained log data.

The destination defines the final boundary. A Kafka acknowledgment, an object-store commit, and a database transaction do not prove the same thing, so a processor must state exactly what its delivery guarantee covers.


What to ask when evaluating a processor

  1. Which sources, versions, log modes, and configurations does it support?
  2. What does each delivery guarantee cover?
  3. When does it acknowledge the source?
  4. What makes a checkpoint safe?
  5. What happens when the source, destination, or state store fails?
  6. How does it bound queues, memory, retained logs, and large transactions?
  7. Which external processes and services must your team operate?

Where to go next

Reading the native log begins the work. A processor still has to preserve the required context, control progress, deliver to every required destination, and stop when it cannot prove the next safe action.

The next articles explain WAL, binlog, and oplog and Change Data Capture.

We built Remac as a high-performance, database-agnostic transaction log processor. It runs as one self-contained processing engine and does not require Kafka Connect, a JVM, or a Kubernetes cluster. PostgreSQL is the first implemented source. MySQL, MongoDB, and Oracle are planned.


Further reading

More from this volume