/

Glossary

Checkpointing in Data Pipelines: Pause, Resume, Recover

Intergalactic Data Labs

—

—

11 min read

Table of contents

Summarize

A checkpoint in a data pipeline is a durable record of how far the pipeline got, so a restart resumes there instead of from zero. Postgres keeps a log position in a replication slot, MySQL a binlog position or GTID set, Kafka a consumer offset, and Flink or Spark a state snapshot, as of October 2026. Where it lives decides whether a crash replays seconds or re-snapshots the table.

Engine

Checkpoint

Lives in

Advanced by

Postgres logical replication

confirmed_flush_lsn on the slot

Server catalog, crash safe

Consumer status messages

MySQL binlog

File and position, or GTID set

Replica, plus gtid_executed on the source

Replica apply

Kafka consumer

Next offset per partition

__consumer_offsets topic

Commit call or auto commit

Apache Flink

Operator state plus source positions

execution.checkpointing.dir

Barrier aligned snapshot

Spark Structured Streaming

Offset ranges and batch commits

checkpointLocation on HDFS or S3

Each micro batch

Cursor polling

updated_at high water mark

The tool's state store or the target table

Each run

What a checkpoint records in each engine

Each engine checkpoints the smallest thing that lets it replay the rest, and that thing is rarely the data. A Postgres logical replication slot records one LSN per consumer. The Postgres docs state that "Slots persist independently of the connection using them and are crash-safe." The confirmed_flush_lsn column of pg_replication_slots holds the position the consumer has confirmed, and the server keeps WAL from restart_lsn onward.

MySQL records a binlog file name and byte offset, or with GTIDs a set of transaction identifiers. The MySQL 8.4 manual puts it this way. "GTIDs replace the file-offset pairs previously required to determine points for starting, stopping, or resuming the flow of data between source and replica." The position is exposed by SHOW BINARY LOG STATUS in 8.4, which removed the older SHOW MASTER STATUS.

Kafka keeps the smallest checkpoint of all, one integer per partition. The Kafka design doc puts it plainly. "This state can be periodically checkpointed. This makes the equivalent of message acknowledgements very cheap."

Flink and Spark record more, because they hold state. A Flink checkpoint stores each source's offset and a pointer to every operator's state. Spark writes an offsets log before each micro batch and a commits log after it lands.

How does a checkpoint survive a restart?

A checkpoint survives only when it is written somewhere that outlives the process, and the defaults are not always that place. Flink's docs warn that the snapshot store is the JobManager's memory by default and that "for production use a distributed reliable storage should be configured (such as HDFS)."

Spark requires the checkpoint location to sit in an HDFS compatible file system. Debezium Server defaults to a file offset store at data/offsets.dat unless you point it at a JDBC or Redis store, and a container restart takes that file with it.

The sturdier designs keep the checkpoint next to the data. Kafka Connect in distributed mode stores offsets in a replicated, compacted topic. dlt writes its state into the destination as a _dlt_pipeline_state table. Its docs say that "when faced with a clean start, it will try to restore the state from the destination." Airbyte's protocol only persists a state message after the destination confirms every record before it was committed.

When is the checkpoint written, before or after the write?

Writing the checkpoint before the output gives at-most-once delivery, writing it after gives at-least-once, and writing both in one transaction gives exactly-once. The Kafka design doc spells out all three cases and notes that "Kafka guarantees at-least-once delivery by default."

Order

Guarantee

After a crash

Who does this

Checkpoint, then write

At most once

Rows between the two are lost

Kafka auto commit before processing

Write, then checkpoint

At least once

Rows between the two repeat

Debezium, Airbyte, Kafka Connect offsets

Write and checkpoint together

Exactly once

Nothing repeats or is lost

Flink two phase commit, Estuary, offset in the same transaction

At-least-once is the common choice because it is cheap and a primary key makes it safe. Debezium says the connector "provides at least once delivery of change events" and that duplicates after a crash depend on the offset flush period. Airbyte describes itself as "a deliver at-least-once system" in its own docs.

Even Postgres warns that a slot persists its position only at a server checkpoint, so a crash can replay recent changes to the client.

Exactly-once costs latency, since Flink's Kafka sink in exactly-once mode holds every record inside a transaction until the next checkpoint commits it.

How often should a pipeline checkpoint?

Checkpoint often enough that the replay after a crash fits your tolerance, and rarely enough that the checkpoint does not become the bottleneck. Flink's docs put it this way. "The checkpoint interval is a means of trading off the overhead of fault tolerance during execution with the recovery time (the number of records that need to be replayed)."

Tool

Default cadence

Knob

Kafka consumer

Every 5 seconds

auto.commit.interval.ms

Kafka Connect

Every 60 seconds

offset.flush.interval.ms

Flink

Disabled until set

execution.checkpointing.interval

Spark

Every micro batch

trigger(processingTime=...)

Airbyte CDK

Every N records

state_checkpoint_interval

PeerDB

60 seconds idle or 100K rows

PEERDB_CDC_IDLE_TIMEOUT_SECONDS

Flink's production checklist frames the interval as a service level, since a five minute interval caps reprocessing at five minutes of data.

What happens to a replication slot when the consumer pauses?

The source keeps every byte of log the paused consumer has not acknowledged, until the disk fills or a retention limit invalidates the checkpoint. Postgres slots "will prevent removal of required resources even when there is no connection using them," and in extreme cases the server shuts down to avoid transaction ID wraparound. The max_slot_wal_keep_size setting caps that retention, but its default of -1 means unlimited.

Once a slot falls behind that cap, its wal_status reads lost and the checkpoint it held is worthless. Watch for it with one query.

SELECT slot_name, active, wal_status, safe_wal_size,
       pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn) AS lag_bytes
FROM pg_replication_slots;
SELECT slot_name, active, wal_status, safe_wal_size,
       pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn) AS lag_bytes
FROM pg_replication_slots;
SELECT slot_name, active, wal_status, safe_wal_size,
       pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn) AS lag_bytes
FROM pg_replication_slots;

MySQL expires binlogs on a timer instead, 30 days by default, and a replica that returns after the purge gets error 1789 and cannot recover automatically. Every vendor documents the same ending, and Airbyte tells you to drop and recreate the slot, then reset the connection for a full re-sync.

Failure modes a checkpoint does not prevent

A checkpoint records position, so every failure below comes from trusting it to record more than that.

Duplicates after a crash

Any write-then-checkpoint tool replays the rows between its last checkpoint and the crash. The Kafka consumer docs describe a restarted process that "would repeat the insert of the last batch of data." An upsert keyed on the primary key absorbs this. An append-only sink does not.

Rows lost to an early commit

Kafka auto commit can advance past records you have not finished processing. The same docs warn that the committed offset can get ahead of the consumed position, "which results in missing records." Two Debezium connectors sharing one slot lose data the same way, silently.

A checkpoint the job can no longer read

A checkpoint ties progress to one shape of the job. Flink keeps savepoints "for planned, manual operations" such as upgrades, and they only map back when every operator has a stable uid. Spark's recovery rules forbid changing input sources or any stateful operation between restarts from the same checkpoint.

A watermark that misses late rows

A cursor on updated_at skips any row whose timestamp lands at or below the stored maximum, which Sling's docs call out for late arriving events and backdated corrections. The fix is a lookback window that re-reads recent rows and upserts them, which dlt documents as lag.

Checkpoint design across eleven pipeline tools

Every cell below comes from the tool's own documentation, linked in the first column.

Tool

Checkpoint

Stored in

Resume unit

Guarantee

Filament

Last row position per accepted batch, CRC32-C on every batch

Pipeline datastore, keyed to route and version

Batch, keyed tables only, a keyless full read restarts the table

At least once, upsert converges

Debezium

LSN or binlog position per event

Kafka Connect offsets topic, or a file, JDBC, or Redis store

Streaming resumes, an initial snapshot restarts

At least once

Kafka Connect

Source offsets per record

offset.storage.topic or a local file

Last flushed offset

At least once, exactly once for some connectors

Apache Flink

Operator state plus source positions

Checkpoint directory, HA metadata

Last completed checkpoint

Exactly once state, sink dependent

Spark Structured Streaming

Offset ranges, commits, state

checkpointLocation

Next uncommitted batch

Exactly once with idempotent sinks

Airbyte

Per stream state message

Platform database after destination commit

State message

At least once

dlt

Cursor value and load id

_dlt_pipeline_state in the destination

Load package

Cursor holds until the load completes

Estuary Flow

Connector and read checkpoints

Recovery log journals in your bucket

Transaction

Exactly once with transactional endpoints

PeerDB

Batch id with start and end LSN

PeerDB catalog

Batch

Not stated

Sling

max(update_key)

Computed from the target table

Run

Upsert makes re-reads idempotent

Fivetran

Sync cursors, slot LSN for Postgres

Fivetran managed

Table re-sync

Not stated

Filament by Galaxy is built by Galaxy, which also publishes this site.

Choosing the checkpoint strategy for your pipeline

Keep the checkpoint next to the data it describes, and make every write idempotent so a replayed checkpoint costs nothing.

Pipeline

Checkpoint to keep

Watch for

Postgres change data capture

Slot LSN plus a sink side cursor

Slot growth while paused

MySQL change data capture

GTID set

Binlog expiry at 30 days

Kafka to a database

Offset in the same transaction as the rows

Auto commit racing ahead

Stateful streaming

Flink savepoint before every deploy

Missing operator ids

SaaS API polling

Cursor with a lookback window

Late updates and hard deletes

Batch loads into a warehouse

Load id in the destination

Partial loads that never finish

Related guides

Frequently asked questions

What is a checkpoint in a data pipeline?

A checkpoint is a durable record of how far a pipeline has progressed, such as a log position, a consumer offset, a cursor value, or a snapshot of operator state. It is written so that a restart resumes from that point instead of reprocessing everything. Every engine checkpoints the smallest thing that lets it replay the rest.

What is the difference between a checkpoint and a savepoint?

In Apache Flink a checkpoint is taken automatically for crash recovery and is owned by Flink, while a savepoint is a manual, portable snapshot you take before an upgrade or a job change. In SQL the word savepoint means something else entirely, a marker inside one open transaction that you can roll back to.

How often should a system create checkpoints?

Often enough that the data replayed after a crash fits your tolerance, and rarely enough that the checkpoint itself does not slow the pipeline. Flink's own guidance frames the interval as a service level, since a five minute interval means at most five minutes of reprocessing. Kafka consumers auto commit every five seconds by default and Kafka Connect flushes offsets every minute.

Can checkpointing slow down a pipeline?

Yes. A checkpoint costs CPU, network, and storage every time it runs, and exactly-once sinks hold results back until the checkpoint completes, so a shorter interval raises both overhead and pressure on the destination. Incremental and asynchronous checkpoints reduce the cost for large state, so measure the job at the interval you plan to run.

What happens if a Postgres replication slot is invalidated?

The slot's WAL status becomes lost and no consumer can read from it again, because the server has already removed the WAL files the slot needed. The pipeline has to drop the slot, create a new one, and take a fresh snapshot of every table it was tracking. Airbyte, Fivetran, and Estuary all document a full re-sync as the only recovery.

Does a checkpoint guarantee exactly-once delivery?

No. A checkpoint only records position. Exactly-once delivery needs the checkpoint and the output to commit together, either in one database transaction, through a two-phase commit coordinated with the checkpoint, or by making every write idempotent so a replay changes nothing. Most replication tools are at-least-once by design and rely on upsert by primary key to converge.

Where should a checkpoint be stored?

Somewhere that outlives the process and the machine. A replicated Kafka topic, a database table, or a cloud object store all qualify. Local disk inside a container and the JobManager's memory in Flink do not. The best place is next to the data the checkpoint describes, so the two can commit as one unit.

Can you resume a Spark streaming query after changing the code?

Only for some changes. Spark allows adding or removing filters and swapping a file sink for a Kafka sink. It does not allow changing the number or type of input sources, moving a file sink's output directory, or altering any stateful operation such as an aggregation or a join. Those changes need a new checkpoint location and a fresh start.

More articles

Stay up to date with what we’re building

Stay up to date with what we’re building

Stay up to date with what we’re building

Questions

Answered

FAQ

What does Galaxy do?

What is Filament?

What is enterprise context management?

What does working with Galaxy look like?

How do you handle security and compliance?

Why does Galaxy build in the open?

Own your knowledge stack

Own your knowledge stack

Copyright © 2026 Galaxy. All rights reserved.