Solanica Open Sources OpenEverest Branching: Branch or Checkpoint?

Solanica Open Sources OpenEverest Branching: Branch or Checkpoint?

• By Sergey Pronin Sergey Pronin

OpenEverest gives users primitives for working safely with databases. A database branch is one of those primitives. It gives you an isolated writable copy of an existing database so you can test a migration, reproduce a bug, or let an agent work without touching the original instance.

Now Solanica is opening up the code behind it.

The OpenEverest branching plugin is in the solanicaio organization and become an Apache License 2.0 open source project. The repository contains the Kubernetes resources, controllers, provider engines, API, and UI used to create branches, reset them, take restore points, roll back, and promote a branch.

Opening the plugin makes room for contributions where this feature grows fastest: more database providers, more storage backends, stronger recovery semantics, and better automation around migrations and agents.

Read the Branching Plugin documentation for installation, supported providers, storage requirements, Kubernetes resources, and API examples.

A side-by-side diagram showing an isolated database branch and an in-place checkpoint with rollback

A branch isolates new work on another Instance. A checkpoint keeps the same Instance and preserves a destructive rollback path.

Branch and checkpoint solve different problems

The plugin’s UI calls a checkpoint a restore point. In this post, “checkpoint” means the point in time to which the whole instance can be rolled back. It is not only the PostgreSQL CHECKPOINT command, although PostgreSQL checkpoints are one part of the implementation.

A branch and a checkpoint can both start with a Kubernetes VolumeSnapshot. After that, they optimize for different outcomes.

Decision pointDatabase branchMove work elsewhereCheckpoint + rollbackKeep work in place
Where work runsA new database InstanceThe original Instance
IsolationFull data and compute isolationNo isolation
Extra computeYes, for an instance branchNo
EndpointNew endpointSame endpoint
If the test failsDelete the branchThe original never moved.Roll the Instance backIt restarts from the snapshot.
Later writesStay on the originalAre discarded
Client impactNone on the originalReconnects required during rollback
Best fitPreviews, parallel tests, risky production-like workSchema experiments, migrations, bounded agent work

The short version is:

A branch gives risky work another place to run. A checkpoint gives risky work a way back.

How a branch works

A Snapshot branch is a new single-node Instance created from a copy-on-write snapshot of the source.

  1. The plugin chooses a healthy standby when one is available.
  2. It waits until the standby contains the writes committed when the branch was requested.
  3. It asks the database to checkpoint or reach a recoverable storage state.
  4. It creates a VolumeSnapshot.
  5. The provider creates a new Instance from that snapshot.

The source keeps running. The branch gets separate pods, CPU, memory, configuration, credentials, and an endpoint. Changes on either side do not leak into the other.

That isolation has a cost: a new database Instance has to start. The plugin can make the storage copy in seconds when the CSI driver supports copy-on-write cloning, but it still needs to schedule and start another database.

How a checkpoint and rollback work

A checkpoint takes the inverse approach. No new compute Instance is created.

  1. The plugin snapshots the volumes of the current Instance.
  2. Applications keep using the same endpoint.
  3. If the change succeeds, delete the restore point when it is no longer needed.
  4. If the change fails, stop the Instance, recreate its PVCs from the snapshots, and start it again.

For PostgreSQL, the plugin checkpoints each Instance and snapshots standbys before the primary. The restored database starts with crash recovery from the snapshot’s own pg_wal.

MariaDB restore points capture the replicas before the primary. Branch creation waits for a replica to reach the requested GTID when replication is enabled, and synchronizes a Galera node before snapshotting. InnoDB performs crash recovery when the restored volume starts.

Rollback is deliberately destructive. Every database change after the restore point disappears. The database also restarts, so connected clients must reconnect. External side effects—emails, payments, queue consumers, API calls—are not rolled back.

What we measured

We tested five idle and five busy checkpoint/rollback cycles for PostgreSQL and MariaDB. The PostgreSQL source contained 40 million pgbench rows and was about 6.5 GB. The MariaDB source contained eight sysbench tables with 1 million rows each, about 1.8 GB of data and indexes.

The storage was OpenEBS ZFS LocalPV with copy-on-write snapshots. The busy PostgreSQL run sustained about 600 transactions per second with eight clients. The busy MariaDB run sustained about 170 to 180 transactions per second with eight threads.

The table shows medians across five runs. The client outage is the period in which new database connections could not succeed.

Stacked bars comparing checkpoint creation time and rollback client outage for PostgreSQL and MariaDB

DatabaseWorkloadCreate checkpointRollback readyClient outage
PostgreSQL 18.7two nodesIdle6.23 s19.76 s17.74 s
PostgreSQL 18.7two nodesBusy · ~600 TPS7.11 s22.00 s19.25 s
MariaDB 12.3standaloneIdle2.19 s26.04 s24.61 s
MariaDB 12.3standaloneBusy · ~170–180 TPS2.20 s28.93 s26.98 s

Creating the checkpoint did not cause an obvious throughput interruption. PostgreSQL’s median TPS change during checkpoint creation was -3.6% and MariaDB’s was +0.2%, both within normal run-to-run variation in this test.

For comparison, one Snapshot branch of the 6.5 GB PostgreSQL source became ready in 24.8 seconds and contained all 40 million rows. That is a representative run, not a five-run median.

The consistency test matters more than the clock

Speed is only useful if rollback has the right transaction boundary.

For every test, we:

  1. committed a marker row before the restore point;
  2. created the restore point;
  3. committed another marker after it;
  4. rolled the Instance back;
  5. verified that the first row remained and the second one disappeared.

All 20 cases passed.

That test does not turn a crash-consistent volume snapshot into a distributed transaction. Applications still need to consider queues, object storage, and third-party services. But it confirms the database checkpoint/rollback contract tested here: committed data before the point survives, and later database writes do not.

Copy-on-write changes the storage story

A copy-on-write snapshot is initially cheap in space because it records metadata and continues to reference the existing blocks. Space starts growing when either the live volume or its snapshot-backed clones need to keep different versions of a block.

In the PostgreSQL test, creating the restore point caused no measurable increase at the storage pool’s reporting precision. After writing a 196 MB table, aggregate physical allocation grew by about 210 MB across the primary and standby volumes. Rolling back removed the table.

The exact numbers depend on the CSI driver, compression, database engine, and workload. The important rule is that a retained restore point is not permanent metadata-only storage. It pins the old state and should have a lifetime or retention policy.

Which primitive should you choose?

Use a branch when:

  • the original database must keep serving without rollback risk;
  • you need several experiments to run in parallel;
  • preview environments need their own endpoints and credentials;
  • the test can justify extra compute.

Use a checkpoint when:

  • you intend to test on the existing endpoint;
  • duplicate database compute is unnecessary;
  • losing writes after the checkpoint is the expected failure behavior;
  • a short restart and client reconnect window are acceptable.

For agents, the distinction is useful too. A branch is the safer default for autonomous work. A checkpoint is faster when the task is explicit, bounded, and easy to revert: “take a restore point, apply the migration, run the checks, and either keep the result or roll back.”

OpenEverest keeps these as separate primitives. Automation can combine them into workflows without hiding the isolation and durability tradeoffs from users.

What Solanica is open-sourcing

The branching plugin repository contains:

  • the Branch, RestorePoint, and Operation CRDs;
  • the resumable controller and HTTP API;
  • PostgreSQL, MariaDB, and SQL Server snapshot engines;
  • in-instance PostgreSQL clone support;
  • the OpenEverest UI extension;
  • Helm packaging, tests, architecture notes, and storage guidance.

It will be licensed under Apache License 2.0, like the core OpenEverest project and its providers.

We want the next improvements to happen with the community. Useful contributions include:

  • engines for additional database providers;
  • tests against more CSI snapshot implementations;
  • better retention and capacity visibility;
  • automatic migration and agent workflows built on the existing CRDs;
  • recovery improvements for multi-node topologies.

More branching posts

Try both recovery models

Start with the branching guide

Install the plugin, create one branch and one restore point on a disposable Instance, and see which recovery model fits your workload.

Choose a branch when you need another isolated database. Choose a checkpoint when the right answer is a fast way back to a known state.

See Also