Repository navigation
Administrator Guide
This guide is for the person who sets up and runs a KingresDB cluster. It is a map: each task has a page of its own, and the pages name what is built, what is reviewed and what is still open.
The first release, 0.1.0, was published on 2026-11-28 (see Release Notes, and Installing and Packaging for where to download it). Everything here describes the code on the branch kingres-18. The repository has the same material as a set of guides: quickstart, installation, operator guide, upgrade and limitations. Failover is new in this release: read High Availability before you plan a cluster with standbys, and test your recovery procedure on your own cluster.
| Thing | What it is | Page |
|---|---|---|
| Server | One machine with one kingresd and one or more PostgreSQL instances. Its id is the host name it registers under |
Servers Databases and Roles |
| Manager leader | The server that runs the primary of the map group (group 0). Mutating cluster operations are forwarded to it | Control Plane and REST API |
| Shard group | One primary plus its standbys. Buckets of distributed tables are assigned to groups | Sharding |
| Cluster role | Membership in kingres_admin, kingres_ops, kingres_readonly or kingres_stats; it decides what the REST API and the console allow |
Servers Databases and Roles |
| Task | A durable, resumable long operation (create a database, add a server, rebalance, failover). Followed under /tasks
|
REST API Reference |
| You want to | Read |
|---|---|
| Install the package or run the container | Installing and Packaging |
| Create a cluster, add or remove a server, understand ports and certificates | Cluster Setup |
| Create databases, roles, grants and network access rules; change server groups | Servers Databases and Roles |
| Spread buckets over new servers, split a bucket, drain a server | Rebalancing |
| Distribute, move or undistribute tables and schemas | Sharding Table Lifecycle, Sharding |
| Set up standbys, fail over or switch over, restore preferred primaries | High Availability |
Change kingresd settings or PostgreSQL parameters |
Configuration |
| Turn on approximate aggregates, convert tables to columnar storage, set time-partitioning policies | Analytics Extensions |
| Export or import a table (CSV) or a whole database | the operator guide, sections 12 and 13 (see below) |
| Upgrade the package or the extensions | Upgrades |
| Work in the console | Web Console |
| Script the cluster | REST API Reference |
| Set up the ledger signing, publication and anchoring | Ledger Signing and Publication, Ledger Anchoring |
| Monitor, back up, restore, respond to an incident | Operations, Monitoring and Alerts, Backup Restore and PITR, Runbooks, Troubleshooting |
| Know what does not work yet | Limitations and Known Issues |
- Install the package (or start the container) on every server of one PostgreSQL major. All servers of a cluster run the same major; moving between majors is not designed (Upgrades).
- On the first server, read the one-time setup token and create the cluster from the console or with
POST /api/v1/setup/init-cluster. - On each further server set
server-host,internal-listenandpg-listen, then either join it (POST /api/v1/setup/join-clusteron the new server) or add it from the cluster (POST /api/v1/servers). Prefer a pinned certificate fingerprint. See Cluster Setup. - Create a database with sharding (and the ledger, if wanted) enabled, then distribute tables with SQL (Sharding) or from the console.
- A new server holds no buckets until a rebalance runs (Rebalancing).
A table is exported and imported as CSV, and a whole database is exported as one archive and imported as a new database (operator guide, section 12 and section 13). Both are off until the cluster setting dataTransfer.enabled is on, need TLS and kingres_admin, and run as the role that asked. A database archive carries no roles, grants, functions, triggers, policies or large objects. While an import runs, a drain, a rebalance and the addition or removal of a server are refused.
- Failover is built in several forms (by hand, of the map group, automatic, planned switchover, hard failover of the map group, local release of a held map group). It is new in this release; automatic failover is off by default; two failures at once and a failure during a rebalance are not tested on a cluster.
- The escrow of the key of the certificate authority is off until you switch it on; without it a failover of the map group needs the key restored from a backup of the old leader (High Availability).
- Anchoring to RFC 3161 authorities and to OpenTimestamps was tested against local fakes only (Ledger Anchoring).
- Every server of a cluster is fully trusted by every other server; see Security Model.
- There is no automated backup and no point-in-time-recovery set-up in the package; see Backup Restore and PITR.
- Packages in 0.1.0 and 0.1.1 are Debian (
.deb) and a container image, for amd64; 0.2.0 adds RPM packages for the RHEL 9 and 10 families and Fedora. See Installing and Packaging and Limitations and Known Issues.
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