Skip to content

Administrator Guide

Mohammad Rasoul Kazemi edited this page Nov 30, 2026 · 6 revisions

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.

What an administrator works with

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

Tasks of an administrator

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

A first cluster in outline

  1. 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).
  2. 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.
  3. On each further server set server-host, internal-listen and pg-listen, then either join it (POST /api/v1/setup/join-cluster on the new server) or add it from the cluster (POST /api/v1/servers). Prefer a pinned certificate fingerprint. See Cluster Setup.
  4. Create a database with sharding (and the ledger, if wanted) enabled, then distribute tables with SQL (Sharding) or from the console.
  5. A new server holds no buckets until a rebalance runs (Rebalancing).

Export and import

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.

Things to know before you rely on it

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

Sources

Clone this wiki locally