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

FAQ

Is KingresDB released?

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.

Is it PostgreSQL?

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.

Does a fork of PostgreSQL mean you maintain a database engine of your own?

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.

Which PostgreSQL versions are supported?

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.

What licence is it under?

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.

Can I use it in production?

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).

Can I export and import data?

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.

How is data distributed?

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.

Is a cross-shard read consistent?

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.

Do all queries work on distributed tables?

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.

Can I turn an existing table into a distributed one?

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.

Does the ledger stop someone from changing data?

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.

What does the verifier need?

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.

Where is Patroni or etcd?

Not shipped. Standby management and failover are inside kingresd, fenced by leases from a majority of servers (ADR 0021).

How do I monitor it?

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).

Why is there no CI badge?

GitHub Actions is not used. Maintainers run the checks locally. See Development and Testing.

How do I report a security problem?

Privately, through the repository's Security tab, "Report a vulnerability". See Security Model.

Where is the design?

Architecture and the architecture document.

How do I back up a node?

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.

What happens to the ledger if I restore an older backup?

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.

How do I upgrade?

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.

Why does docker exec kingres cat /var/lib/kingres/setup-token fail in Git Bash on Windows?

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.

Is there a container image on Docker Hub?

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.

Does it run on Fedora, RHEL, AlmaLinux or Rocky Linux?

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.

Can I install pgvector, PostGIS, Citus or TimescaleDB?

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.

Which ports does it use?

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.

Where are the logs?

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.

What do I do when an alert is raised?

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.

What does a KS001 error mean?

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.

What is the structure of this documentation?

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.

Sources

Clone this wiki locally