Cockroach Creates Pebble
Written by Kay Ewbank   
Monday, 28 September 2020

Cockroach Labs has introduced Pebble, which is described as a RocksDB inspired and RocksDB compatible key-value store. Until now, CockroachDB has used RocksDB as its key-value store, but Pebble provides more control over future enhancements tailored for CockroachDB’s needs.

CockroachDB is a distributed SQL database that is cloud native and offers horizontal scalability with no single points of failure.


The Cockroach Labs team says that in addition to giving more control, Pebble brings better performance and stability, and avoids the challenges of traversing the Cgo boundary. Pebble will replace RocksDB as the default storage engine for CockroachDB from the 20.2 release this fall.

Pebble inherits the RocksDB file formats and a few extensions such as range deletion tombstones, table-level bloom filters, and updates to the MANIFEST format. It doesn't have all RocksDB features, concentrating instead on the feature set needed by CockroachDB.

Pebble's API and internal structures resemble RocksDB. Pebble is an LSM key-value store which provides Set, Merge, Delete, and DeleteRange operations. Operations can be grouped into atomic batches, and records can be read individually via Get, or iterated over in key order using an Iterator.

Pebble supports read-only snapshots to provide a lightweight point in time view of the database. Internally, the data in Pebble is stored in a combination of Write Ahead Logs (WALs) and Sorted String Table (sstables). Recently written data is buffered in memory in a series of Memtables. These are flushed to disk to create sstables, and sstables are periodically compacted in the background.

The list of features starts with the basic operations - Set, Get, Merge, Delete, Single Delete and Range Delete. You get block-based tables and checkpoints, alond with indexed batches and write-only batches. It supports iterator options including lower and upper bounds and table filters. Level-based, manual and concurrent compaction is supported, along with intra-Lo compaction.

While Pebble will become the default storage engine, RocksDB remains as an alternative storage engine in 20.2, but will be fully removed at some point. Pebble is available on GitHub.




More Information


Pebble On GitHub

Related Articles

CockroachDB 20.1 Improves App Development

CockroachCloud Enters Beta

CockroachDB Adds GDPR Compliance

CockroachDB Production Ready

CockroachDB Released


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Stanchion Turns SQLite Into A Column Store

Stanchion is an open-source extension that adds columnar storage capabilities to SQLite, rendering it efficient for analytical reporting.

Visual Studio Code Adds Hey Code Voice Command

The January update to Visual Studio Code has been released, with the headline improvement of a "Hey Code" voice command that starts a voice session with Copilot Chat.

More News

raspberry pi books



or email your comment to:


Last Updated ( Monday, 28 September 2020 )