Repository navigation
FAQ
Yes. The current release is 0.2.2, published on 2026-12-02; 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). Install 0.2.2: 0.1.0 has a wrong answer of the pushdown of some outer joins, 0.2.0 has the faults that 0.2.1 fixes, and 0.2.1 fails over a vanished server slowly, which 0.2.2 fixes. There is one release per PostgreSQL major: kingres-0.2.2-pg18 and kingres-0.2.2-pg19. It contains every phase of the roadmap except phase 8 (in design since 2026-11-28, not built) and the later phases 16 to 24. See Status and Roadmap and Release Notes.
No. It is derived from PostgreSQL, keeps PostgreSQL's code under its own licence, and is not endorsed by the PostgreSQL project. Clients that speak the PostgreSQL protocol connect to it.
No. No file of PostgreSQL's server is changed: the registered changes to upstream files are the product version string, one build line, a README section and the licence text, and everything else is in extensions and in the control plane. Security and bug fixes of PostgreSQL arrive by rebasing onto the next upstream tag. What does cost work is keeping the extensions compatible with each new major and publishing a release after each upstream release. The measurement and the open points are in Architecture Risks and Technical Debt, section 4.
PostgreSQL 18.7 (branch kingres-18, the default, on REL_18_7) and PostgreSQL 19.0 (branch kingres-19, on REL_19_0). Every extension is one source that passes its tests on both. A cluster runs one major, and there is no move of a cluster between majors. See Building from Source.
KingresDB's own code is AGPL-3.0-only. PostgreSQL's code keeps the PostgreSQL License. The root COPYRIGHT file says which covers which part. See Contributing.
The first release, 0.1.0, has just been published and has no history in production. Read Limitations and Known Issues first. Failover is new in the first release: test your recovery procedure on your own cluster before you rely on it (High Availability). Anchoring to RFC 3161 authorities and to OpenTimestamps was tested against local fakes only (Ledger Anchoring). There is no automated backup and no point-in-time recovery set-up (Backup Restore and PITR).
Yes. A table is exported and imported as CSV, and a whole database is exported as one archive and imported as a new database. Both are off until the cluster setting dataTransfer.enabled is on, need TLS and kingres_admin, and carry no roles, grants, functions, triggers, policies or large objects (a database archive); a ledger table restarts its chain. See Administrator Guide.
By hash into a fixed number of buckets per colocation group (default 128, set with kingres_shard.default_bucket_count). Each bucket belongs to a shard group. Tables with the same colocation group are placed together so that joins on the distribution key run in one group. Small tables can be reference tables, kept in full on every node. See Sharding.
A statement that spans shard groups reads each group at its own snapshot; there is no global snapshot (phase 8, in design, not built). A transaction that touches one shard group is fully correct. Distributed writes use two-phase commit.
The scan that moves rows to the originating node answers every query shape and is permanent (ADR 0022); pushdown paths only make some queries faster and can each be switched off. A few differences from a single node are named in the README of the extension. See Sharding Query Pushdown.
Yes (create_distributed_table on a table that holds rows, in a blocking and an online form, or from the console). A table can also be made ordinary again, and its distribution column, bucket count or colocation group changed. User-partitioned tables can be distributed, and related tables can be distributed together. See Sharding Table Lifecycle.
No. It makes changes to history detectable: a hash chain and Merkle blocks, signed and published checkpoints, and a standalone verifier that does not trust the database. A privileged role can still change or drop data, and a database can be dropped with its ledger. See Ledger and Security Model.
A published checkpoint, bundle or proof, and keys or certificates you pin yourself. It does not connect to the database it is checking. See The Verifier.
Not shipped. Standby management and failover are inside kingresd, fenced by leases from a majority of servers (ADR 0021).
kingresd serves /metrics for an external Prometheus (with a bearer token set by metrics-token) and keeps a short in-memory history for the console's charts. No metrics store is bundled (ADR 0020).
GitHub Actions is not used. Maintainers run the checks locally. See Development and Testing.
Privately, through the repository's Security tab, "Report a vulnerability". See Security Model.
Architecture and the architecture document.
kingres-pg_dump for a logical backup of a database and kingres-pg_basebackup for a physical copy are installed; the whole node state is /var/lib/kingres, and a copy of it contains the certificate authority key, so treat it as a secret. There is no automated backup and no point-in-time-recovery configuration. A pg_dump restore gives an empty ledger with a new chain identity; a physical backup keeps the chain. See Backup Restore and PITR.
The chain becomes shorter than what was published or anchored and, once it takes new transactions, differs from it: a fork. The publisher stops that chain, raises ledgerChainDiverged and nothing is signed over it until an operator acknowledges the cut, which closes the old epoch with a signed event. See Runbooks and Ledger Signing and Publication.
Install the new package of the same major; it restarts the database. Then update the extensions of each database with ALTER EXTENSION ... UPDATE; nothing does it for you. The package of the other major is refused, and there is no rollback. A planned switchover must not run while servers of two versions run. See Upgrades.
Git Bash (MSYS) converts an argument that looks like a Unix path into a Windows path, so the container never sees /var/lib/kingres/setup-token and cat answers No such file or directory with a C:/Users/.../Git/... path. Run MSYS_NO_PATHCONV=1 docker exec kingres cat /var/lib/kingres/setup-token, or write //var/lib/kingres/setup-token. PowerShell and CMD need no change; in PowerShell use docker load -i <file>.tar.gz (no gunzip) and put docker run on one line or end each line with a backtick. See Installing and Packaging.
Yes: docker pull kingres/kingres:0.2.2-pg18 (or 0.2.2-pg19). The tags are 0.1.0-pg18, 0.1.0-pg19, 0.1.1-pg18, 0.1.1-pg19, 0.2.0-pg18, 0.2.0-pg19, 0.2.1-pg18, 0.2.1-pg19, 0.2.2-pg18, 0.2.2-pg19, and latest-pg18 and latest-pg19, which point to 0.2.2; there is no tag without the major. Use 0.2.2, not 0.1.0. See Installing and Packaging.
From 0.2.0 there are RPMs for the RHEL 9 and 10 families (el9, el10) and Fedora 44 and 45, one file per system and PostgreSQL major, for amd64 (Installing and Packaging). They are tested on AlmaLinux 9, AlmaLinux 10 and Fedora 44 and 45; Rocky Linux and RHEL themselves are not tested (they are binary compatible with AlmaLinux of the same major), and SELinux in enforcing mode was analysed but not run. 0.1.0 and 0.1.1 have only the Debian package (Ubuntu 24.04) and the container image.
Not in 0.1.0 or 0.1.1. Since 0.2.0 an extension must be in a registry and is installed on every server in one transaction; any other extension is refused (KE001), and Citus, TimescaleDB, pg_partman, postgres_fdw, dblink, pg_repack and pg_ivm are refused for good (KE002). 0.2.0 bundles pgvector and pgaudit; pg_cron was built and then withheld from 0.2.0 (it could not be switched on through the control plane). 0.2.1 bundles pgvector, pgaudit and pg_cron: pg_cron is off until it is switched on in two steps (preload and restart, then its three cluster-level settings and a second restart; see Extensions). PostGIS is planned as a separate package. See Extensions.
8091 for the REST API and console (loopback by default), 8092 for the internal server-to-server API (by convention one above listen, off until set), 5432 for the database. Open the internal API port and the database port between the servers. See Installing and Packaging.
journalctl -u kingres for kingresd; the PostgreSQL log in /var/lib/kingres/instances/1/pgdata/log/; the audit log in /var/lib/kingres/audit.jsonl. See Monitoring and Alerts.
Look up its kind in Monitoring and Alerts; the critical kinds have steps in Runbooks where the sources document any, and say so where they do not.
A stale bucket map: the statement was routed on an old map, because a bucket moved or a group failed over. Retry. The other KS and KL codes are in Troubleshooting.
Product documentation (Product Overview and Features, User Guide, Administrator Guide, REST API Reference, Web Console, Limitations and Known Issues, Release Notes); the architecture in the arc42 structure (Architecture); the data architecture (Data Architecture); development (Repository Layout, Testing Strategy, Release Process); operations (Operations); this glossary and FAQ. Home has the map.
KingresDB's own code is licensed under AGPL-3.0-only. PostgreSQL code keeps the PostgreSQL License. Copyright of the project's own code: RooyeKhat Media Co. KingresDB is derived from PostgreSQL and is not endorsed by the PostgreSQL project. Repository | Licence | COPYRIGHT
KingresDB
1. Product
- Product Overview and Features
- Status and Roadmap
- User Guide
- Administrator Guide
- REST API Reference
- Web Console
- Command Line Client
- Extensions
- Limitations and Known Issues
- Release Notes
Features in detail
- Sharding
- Sharding Query Pushdown
- Sharding Table Lifecycle
- High Availability
- Ledger
- Ledger Signing and Publication
- Ledger Anchoring
- The Verifier
- Analytics Extensions
Administration
- Cluster Setup
- Servers Databases and Roles
- Rebalancing
- Configuration
- Memory and Warm-up
- Control Plane and REST API
- Upgrades
2. Architecture (arc42)
- Architecture
- 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
- Security Model
- Architecture Decisions
- Architecture Quality Requirements
- Architecture Risks and Technical Debt
- Enterprise Architecture
3. Data architecture
- Data Architecture
- Data Model Sharding
- Data Model Ledger
- Data Model System Database
- Data Model Analytics
- Data Lifecycle
- Backup Restore and PITR
- Data Security
- Data Quality and Integrity
4. Development
- Building from Source
- Development and Testing
- Repository Layout
- Coding Standards
- Branching and Synchronisation
- Testing Strategy
- Review Process
- Release Process
- Contributing
5. Operations