OLTP database

A lighter database for modern software.

General-purpose databases carry three decades of machinery built for every workload. KDBS keeps what modern services run, keyed reads and writes, short transactions and joins along keys, and leaves the rest out. One binary, one required setting, nothing to vacuum.

terminalshell · SQL
$ cat kds.confbuffer_pool_frames = 16384$ ./kds_server --config kds.conf &$ lskdb.log  kds.conf  kds.db  kds.db.wal  kds_serverkdbs> CREATE TABLE orders (id int64,  customer varchar(32), status varchar(16));CREATED oid=4000kdbs> INSERT INTO orders VALUES ('kim', 'paid');INSERTED oid=4000 id=1 page=131 slot=0kdbs> UPDATE orders SET status = 'shipped' WHERE id = 1;UPDATED 1

Lighter by design

Everything a transactional service needs. Nothing it has to babysit.

The databases most teams run today trace their designs back three decades, to servers that had to handle every workload at once. KDBS starts from what a modern service actually sends, and drops the machinery that workload never needed.

01

No maintenance jobs

  • An UPDATE writes in place, and the old version goes to an undo record that is recycled on its own. There is no VACUUM to schedule and no table bloat to watch.
  • A statement's plan is fixed when it is parsed. There are no planner statistics to keep fresh and no plan that changes overnight.
  • Checkpoints run inside the server, and a restart replays the log before it serves a client.
02

One process, one file, one setting

  • One kds_server binary of about 7 MB, running as one process.
  • The data lives in one growable data file, beside one write-ahead log.
  • A one-line config file starts it. About 55 settings in all, against 399 in PostgreSQL 18.6, and a typo in any of them stops the server instead of being ignored.
03

Built for today's hardware

  • One scheduler thread per core over shared memory, instead of a server process per connection.
  • A statement runs start to finish on its session's core, with asynchronous I/O underneath.
  • Each transaction chooses its durability, strict, group or relaxed, and the possible loss is stated for each.

Then and now

What thirty years added, and what KDBS leaves out.

A general-purpose databaseKDBS
Old row versionsLeft in the table until VACUUM reclaims themKept in undo records and recycled automatically
Query plansChosen from statistics, and can change as the data growsFixed when the statement is parsed
ConnectionsA server process per connectionOne thread per core serves every session
ConfigurationHundreds of settings: 399 in PostgreSQL 18.6About 55, and one is required
ScopeEvery workload: transactions, analytics, extensionsTransactions: keyed access, short transactions, joins along keys

Analytics, replication and clients on another host are out of scope. What KDBS is not lists everything left out, and why.

Use cases

Where a lighter database fits.

A database per service

Each service runs its own small instance on its own host. One binary and a one-line config make that cheap to deploy and cheap to throw away.

Orders, bookings, ledgers

Keyed reads and writes in short transactions, with the durability of each commit chosen by the transaction that makes it.

Code and agents that write SQL

A plan never changes behind your back, and every refusal points at the byte that caused it.

Design philosophy

Every feature left out is machinery you do not run.

Built for OLTP, not general use

Keyed access, equality joins, subqueries, pagination and short transactions. Statements compile to step chains run in written order, so the query is the plan.

The engine tunes itself

Executions feed decaying statistics. The physical optimizer can build and retire lookup structures, changing what exists, not how queries run.

Learned structures are disposable

Delete everything the engine has learned and queries return the same rows, only slower. The B+ tree is the only structure that has to be right.

Reliability without moving parts

One write-ahead log per instance, page checksums, full page images, recovery at startup and deterministic fault injection.

One thread per core

One cooperative reactor per core over shared memory. Statements finish on their session's core, and asynchronous I/O behind an injectable seam lets the engine run under deterministic simulation.

Errors you can act on

Every refusal carries the offending token's byte position. Unsupported means understood and declined, InvalidArgument means simply wrong.

Architecture

One execution model, on every core.

Clients speak KWP/1, a binary protocol. Statements compile at parse time into step chains run on the session's core. Trails and Cabins sit beside an authoritative B+ tree, over one WAL stream and one growable file.

Select a component to open its documentation.

Run a query against a real instance.

The sandbox connects you to a live KDBS server with sample tables already loaded. Nothing to install.

Open the sandbox