Skip to content
Mohammad Rasoul Kazemi edited this page Dec 2, 2026 · 15 revisions

KingresDB

KingresDB (short name kingres) is a database derived from PostgreSQL. It is a thin fork: a small set of core patches, and most of the new behaviour in extensions and in a separate control plane. It adds:

  • Sharding. Tables are split into a fixed number of hash buckets spread over several servers (kingres_shard). See Sharding.
  • A tamper-evident ledger. Ledger tables keep a hash chain and Merkle blocks, so changes to history can be detected. Digests can be signed, published and anchored outside the database (kingres_ledger, kingresd, and the standalone verifier kingres-verify). See Ledger and The Verifier.
  • A cluster control plane and web console. Every node runs kingresd, which serves a REST API and a web panel for creating or joining a cluster, managing databases, users and servers, rebalancing and failover. See Control Plane and REST API and Web Console.
  • Analytics extensions. Approximate aggregates, time partitioning and columnar storage (kingres_sketch, kingres_timepart, kingres_columnar). See Analytics Extensions.

KingresDB is built for PostgreSQL 18.7 (branch kingres-18, the default branch) and for 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.

Status

The current release is 0.2.2, published on 2026-12-02 (for PostgreSQL 18.7 and 19.0). It supersedes 0.2.1 (2026-12-02), 0.2.0 (2026-11-30), the first release 0.1.0 and its patch release 0.1.1 (both 2026-11-28); 0.1.0 has a wrong answer of the pushdown of some outer joins, which 0.1.1, 0.2.0, 0.2.1 and 0.2.2 fix, so install 0.2.2. There is one release per PostgreSQL major: kingres-0.2.2-pg18 and kingres-0.2.2-pg19, each with the Debian package, the RPM packages (RHEL 9 and 10 families, Fedora 44 and 45), the image archive and the signed checksums. The pages of 0.2.1, 0.2.0, 0.1.1 and 0.1.0 are marked as superseded. 0.2.0 added the management of third-party extensions (pgvector and pgaudit bundled), more repartitioned joins and UPDATE ... FROM / DELETE ... USING on the groups, kingres-cli, RPM packages, images on Docker Hub and signed checksums. 0.2.1 brings pg_cron back (bundled, off until it is switched on), fixes the loss of the preload list by a standby that is copied while the list changes, adds the check anchors of a ledger verification and the scheduled audit of the publication, and fixes the administration grant of roles made through the API. 0.2.2 fixes the automatic failover of a server that vanished (it began about 14 minutes late and then waited for an operator; in a cluster of two servers it still waits for an operator), a settings change that was lost when two writers changed the settings at once, and the build of the image on a clean cache. Its notes are on Release Notes, and the download and the check of the files are on Installing and Packaging. It contains every phase of the roadmap except phase 8 (atomic visibility of distributed transactions and a multi-node ledger; in design since 2026-11-28, nothing built) and the later phases 16 to 24, which are planned or designed. Every other phase is built: sharding with pushdown, bucket moves and elasticity, distributed schemas, table lifecycle, high availability with failover and switchover (also of the map group), the ledger with signing, publication and anchoring, the analytics extensions, configuration from the console, the export and import of tables and databases, and extension management. The REST contract is 0.37.0 (199 operations).

The container images are public on Docker Hub: docker pull kingres/kingres:0.2.0-pg18 (or 0.2.0-pg19; there is no tag without the major). See Installing and Packaging.

Some boundaries stay and are stated plainly:

  • There is no global snapshot across shard groups. See Sharding and Limitations and Known Issues.
  • Failover is new in this release: test your recovery procedure on your own cluster before you rely on it. See High Availability.
  • The anchoring to RFC 3161 authorities and to OpenTimestamps was tested against local fakes only. See Ledger Anchoring.
  • There is no automated backup and no point-in-time recovery set-up. Packages are Debian (.deb), RPM (RHEL 9 and 10 families and Fedora 44 and 45, since 0.2.0) and a container image, for amd64 only. See Backup Restore and PITR and Installing and Packaging.

The state of every phase, with links to the design documents, is on Status and Roadmap.

Map of the documentation

The wiki follows the standard documentation set. The sidebar groups the same pages.

1. Product documentation

Page Content
Product Overview and Features What exists, by component and phase
Status and Roadmap The phase table and the roadmap after the first release
User Guide SQL usage of every extension, with worked examples; details in Sharding, Sharding Query Pushdown, Sharding Table Lifecycle, Ledger, The Verifier and Analytics Extensions
Administrator Guide Cluster Setup, Servers Databases and Roles, Rebalancing, High Availability, Configuration, Upgrades
REST API Reference Operations, authentication, errors and versioning of the contract; see also Control Plane and REST API
Web Console A guide to every page of the console
Command Line Client kingres-cli, the command-line client of the REST API: login, tables or JSON, waiting for tasks, transfers, exit codes; part of release 0.2.0
Extensions Management of third-party extensions (phase 15): the registry, refusals, cluster-wide statements, feature locks; part of release 0.2.0
Limitations and Known Issues Stated limits, by area
Release Notes The first release, 0.1.0 (2026-11-28): what it contains and its known limitations

2. Architecture (arc42, with C4 diagrams)

Architecture is the entry and the map. The chapters are Architecture Introduction and Goals, Architecture Constraints, Architecture System Context, Architecture Containers, Architecture Components, Architecture Runtime Views Sharding, Architecture Runtime Views Availability and Ledger, Architecture Deployment, Architecture Crosscutting Concepts (with Security Model), Architecture Decisions, Architecture Quality Requirements and Architecture Risks and Technical Debt. The platform view and the capability map are in Enterprise Architecture.

3. Data architecture

Data Architecture is the entry. The models are Data Model Sharding, Data Model Ledger, Data Model System Database and Data Model Analytics. Then Data Lifecycle, Backup Restore and PITR, Data Security and Data Quality and Integrity.

4. Development documentation

Building from Source, Development and Testing, Repository Layout, Coding Standards, Branching and Synchronisation, Testing Strategy, Review Process, Release Process and Contributing.

5. Operations

Operations is the entry. Installing and Packaging, Upgrades, Backup Restore and PITR, Monitoring and Alerts, Runbooks and Troubleshooting.

6. Glossary and FAQ

Glossary and FAQ.

Where to start

You want to Read
Know what KingresDB is and what is built Product Overview and Features
Understand the design Architecture, then Glossary
Try SQL on the extensions User Guide
Build it Building from Source
Install a package or run a container Installing and Packaging
Run and configure a cluster Administrator Guide and Operations
Fix a problem Troubleshooting and Runbooks
Work on the code Development and Testing and Contributing
Find a quick answer FAQ

Repository

  • Source: https://github.com/KingresDB/Kingres (default branch kingres-18; kingres-19 builds the same extensions against PostgreSQL 19).
  • The KingresDB-specific code and documentation are in kingres/ and contrib/kingres_*. Everything else in the tree is the PostgreSQL source it is based on.
  • Start with the README of the project, which holds the phase table and the repository map, and the user guide (quickstart, installation, operator guide, upgrade, limitations).

Licence

KingresDB's own code is released under the GNU Affero General Public License, version 3 only (AGPL-3.0-only). PostgreSQL's code keeps the PostgreSQL License. See Contributing and the footer of each page.

Sources

Clone this wiki locally