Skip to content

Product Overview and Features

Mohammad Rasoul Kazemi edited this page Dec 1, 2026 · 13 revisions

Product Overview and Features

KingresDB (short name kingres) is a thin fork of PostgreSQL. It adds sharding, a tamper-evident ledger, analytics extensions, a cluster control plane with a REST API, a web console, export and import of tables and databases, and a standalone verifier. It is built for PostgreSQL 18.7 (branch kingres-18) and PostgreSQL 19.0 (branch kingres-19) from one source of each extension. KingresDB is derived from PostgreSQL; it is not PostgreSQL and is not endorsed by the PostgreSQL project.

The first release, 0.1.0, was published on 2026-11-28. It contains every phase of the roadmap except phase 8 (in design since 2026-11-28, not built) and phase 15 (management of third-party extensions: released in 0.2.0; see Extensions). This page says what exists. The state of every phase is on Status and Roadmap; the stated limits are on Limitations and Known Issues; the first release is described on Release Notes.

What exists, by component

Component What it offers Version
kingres_shard Hash-distributed tables (fixed number of buckets), reference tables, distributed DML and DDL, two-phase commit, standbys and promote_node, bucket moves, the row router for bulk writes, query pushdown, the table lifecycle functions, distributed schemas, repartitioned joins, MERGE, distributed columnar tables, approximate count(DISTINCT) 0.9
kingres_ledger Ledger tables with a hash chain and Merkle blocks, digests, ledger_verify, inclusion proofs, a write guard, client signatures 0.3
kingres_sketch Approximate distinct count (hll), top-n (topn), percentiles (tdigest) with partial aggregation in the shard groups 1.0
kingres_timepart Time partitions created ahead and retention by policy; conversion of old partitions to columnar storage and back; policies on user-partitioned distributed tables 0.3
kingres_columnar A table access method that stores a table column by column with compression; append-only; parallel scan, B-tree indexes, logical decoding of inserts, reuse of free space 0.2
kingresd The control plane: agent, manager, client router, REST API; servers, databases, roles, grants, rebalance, failover, certificates, configuration, ledger signing, publication and anchoring, export and import REST contract 0.34.0
REST contract kingres/api/openapi.yaml: 178 operations on 142 paths 0.34.0
Web console A Vue 3 single-page application served by kingresd on every node follows contract 0.34.0
kingres-verify Standalone verifier for ledger digests, proofs, publications, signatures and anchors; does not trust the database. Its release files are signed with the project's release key built from the Go standard library only
Packaging Debian package (.deb) and container image, one per PostgreSQL major, for amd64 (RPM packages since 0.2.0); a three-node development cluster in Docker Compose; systemd unit; release script 0.1.0

kingresd starts each instance with shared_preload_libraries = 'kingres_shard,kingres_ledger,kingres_columnar,pg_stat_statements'; kingres_columnar and pg_stat_statements are left out when their library is absent. pg_stat_statements and plpgsql are installed in every database that kingresd creates.

Capabilities by phase

Phase Capability State
0 Foundation: fork, two branches, rebrand, licence Done
1 Sharding MVP: fixed hash buckets, catalog, routing Done
2 Distributed DML and DDL, two-phase commit, reference tables Done
2b Pushdown, row router, colocated joins Done
3 Control plane, REST API, web console, package Done
4 Bucket movement and rebalance Done
5 High availability: heartbeats, leases, standbys, client entry point; manual and automatic failover (off by default), planned switchover, switchover and hard failover of the map group, restore of preferred primaries, escrow of the CA key Done
6 Ledger tables, verify, verifier Done
7 Signing, publication, anchoring, aggregate digest, client signatures Done, except step 24 (external signer command, publication mirrors, anchor probe from another server)
9 Table lifecycle: distribute a table that holds rows, make it ordinary again, change the distribution, related tables, user-partitioned tables Done
10 Elasticity: split a bucket, weights, rebalance by disk size, automatic mode, drain a server Done
11 Distributed schemas (schema-based sharding) Done
12 Real-time analytics Done
13 Configuration from the console Done
14a, 14b, 14c Export and import of a table (CSV) and of a database (one archive) Done
8 Atomic visibility of distributed transactions and a multi-node ledger In design since 2026-11-28; not built, not in 0.1.0
15 Management of third-party extensions Released in 0.2.0 with pgvector and pgaudit bundled; pg_cron bundled in 0.2.1 (Extensions)

Features in more detail

Sharding (Sharding, Sharding Query Pushdown, Sharding Table Lifecycle, Rebalancing)

  • A distributed table is split into a fixed number of hash buckets assigned to shard groups; a reference table is held in full by every node. A schema can be distributed as a unit.
  • Writes can be sent to any node, which routes them. A distributed transaction uses two-phase commit with Read Committed in each shard and no global snapshot.
  • The row-moving scan answers every query and stays as the fallback; pushdown paths (closed queries, partial aggregation, sort and limit, colocated joins, repartitioned joins) only add faster paths. From 0.2.0 the repartitioned join ships up to three tables, also the preserved side of an outer join, and UPDATE ... FROM and DELETE ... USING run on the groups.
  • Buckets can be moved or split, and the control plane drives a rebalance (by bucket count or by disk size, with weights, an automatic mode and the draining of a server).

High availability (High Availability)

  • Standbys, failover and switchover are part of kingresd, fenced by leases from a majority of servers. Automatic failover is off by default.

Ledger (Ledger, Ledger Signing and Publication, Ledger Anchoring, The Verifier)

  • Tamper evidence for tables: entries are chained and gathered in Merkle blocks; ledger_verify checks the database against itself.
  • The control plane keeps a transparency log per chain, signs checkpoints, serves a publication, and can anchor checkpoints in WORM object stores, RFC 3161 time-stamp authorities and OpenTimestamps (the last two tested against local fakes only). The verifier checks all of it without trusting the database. Since 0.2.1 the server also checks its own anchors (the check anchors of a ledger verification, with a stored report that says ok, failed or incomplete) and audits its own publication on a schedule (every 24 hours by default; the alerts ledgerPublicationAltered, ledgerPublicationBehind and ledgerPublicationUnreadable); this is not the independent check, which kingres-verify anchors with an auditor's trust file remains.

Control plane and console (Control Plane and REST API, Web Console, Configuration)

  • Create or join a cluster; manage servers, server groups, databases, roles, grants, certificates, network access, PostgreSQL settings and the time zone; run a rebalance; fail over or switch over a group; see logs, alerts, metrics and the audit trail; run SQL in the workbench.

Analytics (Analytics Extensions)

  • Approximate aggregates, time partitions with retention and a scheduler, columnar storage, conversion of tables between row and columnar storage.

Export and import (Administrator Guide)

  • A table as CSV, and a whole database as one archive that creates a new database; both are off until the cluster setting dataTransfer.enabled is on. A database archive carries no roles, grants, functions, triggers, policies or large objects, and a ledger table restarts its chain.

What is not built

  • Phase 8 (atomic visibility of distributed transactions, witnesses and a notary of checkpoints for the ledger): in design since 2026-11-28, nothing built.
  • Phase 15 (management of third-party extensions): released in 0.2.0; pgvector and pgaudit are bundled in the Debian package, the image and the RPM packages; pg_cron was withheld from 0.2.0 and is bundled in 0.2.1 (off until it is switched on); the pushdown for pgvector and PostGIS is not built. See Extensions.
  • An external signer command for the ledger, publication mirrors, the anchor probe from another server, and the runs of the anchors against real time-stamp authorities (phase 18, task 2). The check anchors of a ledger verification and the scheduled audit of the publication are built in release 0.2.1. kingres-cli is part of release 0.2.0 (2026-11-30) and later (Command Line Client).
  • Automated backup and point-in-time recovery set-up; packages for arm64; an RPM in 0.1.0 (it comes with the release after it); signatures of the packages themselves and an apt or dnf repository. See Limitations and Known Issues.

Sources

Clone this wiki locally