Repository navigation
Releases
KingresDB 0.2.2 on PostgreSQL 19
KingresDB 0.2.2
Released 2026-12-02, for PostgreSQL 18 and PostgreSQL 19 from one source.
| PostgreSQL 18 | PostgreSQL 19 | |
|---|---|---|
| Tag | kingres-0.2.2-pg18 |
kingres-0.2.2-pg19 |
| PostgreSQL | 18.7 | 19.0 |
| Commit | 4c7f8dc9c82ad450038ebfd31a5c6ef6f1e68e78 |
10ff44579a89a0bc01bd6137bac3db4761f3c2c1 |
A cluster runs one major. Choose it, and install every server of the cluster from the same one. There is no move between majors yet.
What is in this release
The links in this list are relative to the directory kingres/ of the tagged tree.
The second patch release of the 0.2 line, for PostgreSQL 18.7 and PostgreSQL 19.0, made from the maintenance branches kingres-18-0.2 and kingres-19-0.2 (cut from the tags of 0.2.1; nothing of 0.3.0 is in it). It fixes the automatic failover of a server that vanished (it began a quarter of an hour late and then paused for an operator), the loss of a change to the settings of a server when two writers change them at once, a failed start that was a port clash, the build of the container image on a clean cache, the job count of the image and package builds, and the list of dangerous predefined roles. The REST contract and the extension versions are those of 0.2.1.
Fixed
- An automatic failover of a server that vanished (its host drops every packet instead of refusing connections) no longer starts a quarter of an hour late and no longer waits for an operator. A server that was switched off or whose network was cut without a reset held every call that the failover made to it for the connect timeout of the system (about two minutes), three times over. With such a server the task of the failover began about 14 minutes after the decision and no new primary was there after 20 minutes (a server that is killed and refuses connections was not affected: its writes were back after about 40 seconds). The calls between the servers of a cluster now give up a connection that is not made after 5 seconds, and such a timeout is not repeated against a server that the liveness view of the leader calls dead. The check, the freeze and the stop of the old primary skip a server that the liveness view calls dead; the other calls to it (the last check that the old primary does not run, the unfreeze, the state after the promotion) cost at most one dial of 5 seconds and are not repeated. The lease of the old primary still decides when the new primary may be promoted, and a server that is only suspect or slow is asked as before. A server that is called dead but is still reachable is no longer frozen or stopped by the task, so an old primary that still renews its lease makes the failover wait and stop with
lease_still_heldinstead of moving the group (less availability, no risk to data). The check of the failover for possible data loss also no longer stops the failover of a vanished server: it read how old the last check of the group was when the question was asked, so the task paused for an operator (decided by the owner on 2026-12-02). The age is now lowered by what a majority of the servers have not heard of the server beyond the lease and its margin, as for a crash, and it is taken after the answers of the other servers are in; a group that did not stream a synchronous standby at its last check is still reported as possible data loss. In a cluster of two servers there is no majority once one is gone, so a vanished server there still pauses the failover for an operator. - The container image builds on a clean Docker cache again. The first step of the build stage installs
ca-certificatesfrom the archive of the day, which had moved ahead of the pinned Ubuntu snapshot (libssl3t64at 3.0.13-0ubuntu3.17 against .16 in the snapshot), so the next step failed withlibssl-dev : Depends: libssl3t64 (= 3.0.13-0ubuntu3.16); the image of 0.2.1 was built only because a machine still had that layer cached. The install of the build packages now passes--allow-downgrades, so apt takes such a package back to the version of the snapshot. The snapshot date is unchanged, so the build stays reproducible and the digests of the bundled extensions stay valid. - A failed start that was a port clash is recognised when the logging collector is on. Every managed instance runs the logging collector, which takes the bind error away from the startup log, so a start that failed because another program held the port was not seen as a port clash and a new standby did not move to a free port. The check now also reads what the instance wrote to its log directory during that start (at most 64 KiB of each of the three newest changed files) and names it in the error. The integration tests use the same check: a test instance whose port was taken between the check and the start is made again with a new port (a bind failure only; any other failure still fails the test).
- Tests leave less behind. A test of the verifier that made thousands of temporary directories at once (
kingres-verify-test-*) now removes each world as it ends, so a run that is killed leaves a few hundred at most instead of thousands. pg_read_server_logsis no longer in the list of dangerous predefined roles. It is not a predefined role of PostgreSQL 18 or 19 (pg_authid.dat), so the entry protected nothing; the three roles that exist (pg_execute_server_program,pg_read_server_files,pg_write_server_files) stay, and any otherpg_*target is still refused by the role API.KINGRES_IMAGE_JOBSandKINGRES_RPM_JOBSreach the bundled extensions. The job count of the package and image builds held the compile of PostgreSQL and KingresDB but not the build of pgvector, pg_cron and pgaudit, which still used every CPU.packaging/build/build.sh --jobsnow gives it toextensions/build-all.sh --jobsand so to everybuild-extension.sh; without a value every CPU is used, as before.- A change to the settings of a server is no longer lost when two things change them at the same time. The settings file of an instance was rewritten as a whole by every part that changes it (the memory quota and the log directory in the local settings, the synchronous standby names, the repointing of a standby during a failover, the rebuild of an old primary, the certificates a cluster change brings). Each of them read the settings, changed its own copy and wrote it back, so a change that another part made between the read and the write was silently undone, for example a quota change during a failover repoint. All of them now change only the fields they name, on the settings as they are at that moment, under one lock per instance; the rebuild of an old primary does so after the copy (pg_rewind or the base backup) has finished. Only the creation of a new instance still writes a whole record, because there is nothing else to lose.
Changed
- The builder pin files of the Fedora targets are renewed. The pinned packages of
fc44andfc45(made on 2026-11-30) had left the Fedora mirrors, which keep only the newest build of a package, so the RPM build of those two targets stopped inbuilder-packages.sh.rpm/pins/fc44.txtandrpm/pins/fc45.txtwere made again withpin-builder.shon 2026-12-02. The digests of the bundled extensions did not change (the builds check them against the registry), so no registry or generated file changed.
Upgrade
A rolling package or image upgrade from 0.2.1: replace the package (or the image) of the same major on every server, one at a time. Nothing else is to be done: no extension has a new version, there is no migration and no change to the REST contract.
Files
All package and image files are listed in kingres-SHA256SUMS, which is signed (kingres-SHA256SUMS.note); see below.
-
pg18/kingres_0.2.2+pg18-1_amd64.deb -
pg18/kingres-pg18-0.2.2-1.el9.x86_64.rpm(RHEL 9 family: AlmaLinux 9, Rocky Linux 9, RHEL 9;dnf install ./kingres-pg18-0.2.2-1.el9.x86_64.rpm) -
pg18/kingres-pg18-0.2.2-1.el10.x86_64.rpm(RHEL 10 family: AlmaLinux 10, Rocky Linux 10, RHEL 10;dnf install ./kingres-pg18-0.2.2-1.el10.x86_64.rpm) -
pg18/kingres-pg18-0.2.2-1.fc44.x86_64.rpm(Fedora 44;dnf install ./kingres-pg18-0.2.2-1.fc44.x86_64.rpm) -
pg18/kingres-pg18-0.2.2-1.fc45.x86_64.rpm(Fedora 45;dnf install ./kingres-pg18-0.2.2-1.fc45.x86_64.rpm) -
pg18/kingres-0.2.2-pg18-image.tar.gz(docker load, imagekingres:0.2.2-pg18) -
pg19/kingres_0.2.2+pg19-1_amd64.deb -
pg19/kingres-pg19-0.2.2-1.el9.x86_64.rpm(RHEL 9 family: AlmaLinux 9, Rocky Linux 9, RHEL 9;dnf install ./kingres-pg19-0.2.2-1.el9.x86_64.rpm) -
pg19/kingres-pg19-0.2.2-1.el10.x86_64.rpm(RHEL 10 family: AlmaLinux 10, Rocky Linux 10, RHEL 10;dnf install ./kingres-pg19-0.2.2-1.el10.x86_64.rpm) -
pg19/kingres-pg19-0.2.2-1.fc44.x86_64.rpm(Fedora 44;dnf install ./kingres-pg19-0.2.2-1.fc44.x86_64.rpm) -
pg19/kingres-pg19-0.2.2-1.fc45.x86_64.rpm(Fedora 45;dnf install ./kingres-pg19-0.2.2-1.fc45.x86_64.rpm) -
pg19/kingres-0.2.2-pg19-image.tar.gz(docker load, imagekingres:0.2.2-pg19) -
kingres-SHA256SUMS(the checksums of all the files above by their plain names;sha256sum -c kingres-SHA256SUMSin the folder that holds them) andkingres-SHA256SUMS.note, a signed note over it made with the release keybbwi8vQotQ8amSyMOM70mk1Q+JSSD2gmbBDxnYiTma0=;kingres-verify release verify --sums kingres-SHA256SUMS --note kingres-SHA256SUMS.note --key <the public key> --binary <file>checks a file against it. The packages and images themselves are not signed.
Checks that were run before the tags were made
Each line is a check of the release process (docs/dev/releases.md, "What a release is"), recorded by whoever ran it, with the commit it ran on.
| Major | Check | Result | Commit |
|---|---|---|---|
| 18 | tree-build | pass | 4c7f8dc |
| 19 | tree-build | pass | 10ff445 ... |
KingresDB 0.2.2 on PostgreSQL 18
KingresDB 0.2.2
Released 2026-12-02, for PostgreSQL 18 and PostgreSQL 19 from one source.
| PostgreSQL 18 | PostgreSQL 19 | |
|---|---|---|
| Tag | kingres-0.2.2-pg18 |
kingres-0.2.2-pg19 |
| PostgreSQL | 18.7 | 19.0 |
| Commit | 4c7f8dc9c82ad450038ebfd31a5c6ef6f1e68e78 |
10ff44579a89a0bc01bd6137bac3db4761f3c2c1 |
A cluster runs one major. Choose it, and install every server of the cluster from the same one. There is no move between majors yet.
What is in this release
The links in this list are relative to the directory kingres/ of the tagged tree.
The second patch release of the 0.2 line, for PostgreSQL 18.7 and PostgreSQL 19.0, made from the maintenance branches kingres-18-0.2 and kingres-19-0.2 (cut from the tags of 0.2.1; nothing of 0.3.0 is in it). It fixes the automatic failover of a server that vanished (it began a quarter of an hour late and then paused for an operator), the loss of a change to the settings of a server when two writers change them at once, a failed start that was a port clash, the build of the container image on a clean cache, the job count of the image and package builds, and the list of dangerous predefined roles. The REST contract and the extension versions are those of 0.2.1.
Fixed
- An automatic failover of a server that vanished (its host drops every packet instead of refusing connections) no longer starts a quarter of an hour late and no longer waits for an operator. A server that was switched off or whose network was cut without a reset held every call that the failover made to it for the connect timeout of the system (about two minutes), three times over. With such a server the task of the failover began about 14 minutes after the decision and no new primary was there after 20 minutes (a server that is killed and refuses connections was not affected: its writes were back after about 40 seconds). The calls between the servers of a cluster now give up a connection that is not made after 5 seconds, and such a timeout is not repeated against a server that the liveness view of the leader calls dead. The check, the freeze and the stop of the old primary skip a server that the liveness view calls dead; the other calls to it (the last check that the old primary does not run, the unfreeze, the state after the promotion) cost at most one dial of 5 seconds and are not repeated. The lease of the old primary still decides when the new primary may be promoted, and a server that is only suspect or slow is asked as before. A server that is called dead but is still reachable is no longer frozen or stopped by the task, so an old primary that still renews its lease makes the failover wait and stop with
lease_still_heldinstead of moving the group (less availability, no risk to data). The check of the failover for possible data loss also no longer stops the failover of a vanished server: it read how old the last check of the group was when the question was asked, so the task paused for an operator (decided by the owner on 2026-12-02). The age is now lowered by what a majority of the servers have not heard of the server beyond the lease and its margin, as for a crash, and it is taken after the answers of the other servers are in; a group that did not stream a synchronous standby at its last check is still reported as possible data loss. In a cluster of two servers there is no majority once one is gone, so a vanished server there still pauses the failover for an operator. - The container image builds on a clean Docker cache again. The first step of the build stage installs
ca-certificatesfrom the archive of the day, which had moved ahead of the pinned Ubuntu snapshot (libssl3t64at 3.0.13-0ubuntu3.17 against .16 in the snapshot), so the next step failed withlibssl-dev : Depends: libssl3t64 (= 3.0.13-0ubuntu3.16); the image of 0.2.1 was built only because a machine still had that layer cached. The install of the build packages now passes--allow-downgrades, so apt takes such a package back to the version of the snapshot. The snapshot date is unchanged, so the build stays reproducible and the digests of the bundled extensions stay valid. - A failed start that was a port clash is recognised when the logging collector is on. Every managed instance runs the logging collector, which takes the bind error away from the startup log, so a start that failed because another program held the port was not seen as a port clash and a new standby did not move to a free port. The check now also reads what the instance wrote to its log directory during that start (at most 64 KiB of each of the three newest changed files) and names it in the error. The integration tests use the same check: a test instance whose port was taken between the check and the start is made again with a new port (a bind failure only; any other failure still fails the test).
- Tests leave less behind. A test of the verifier that made thousands of temporary directories at once (
kingres-verify-test-*) now removes each world as it ends, so a run that is killed leaves a few hundred at most instead of thousands. pg_read_server_logsis no longer in the list of dangerous predefined roles. It is not a predefined role of PostgreSQL 18 or 19 (pg_authid.dat), so the entry protected nothing; the three roles that exist (pg_execute_server_program,pg_read_server_files,pg_write_server_files) stay, and any otherpg_*target is still refused by the role API.KINGRES_IMAGE_JOBSandKINGRES_RPM_JOBSreach the bundled extensions. The job count of the package and image builds held the compile of PostgreSQL and KingresDB but not the build of pgvector, pg_cron and pgaudit, which still used every CPU.packaging/build/build.sh --jobsnow gives it toextensions/build-all.sh --jobsand so to everybuild-extension.sh; without a value every CPU is used, as before.- A change to the settings of a server is no longer lost when two things change them at the same time. The settings file of an instance was rewritten as a whole by every part that changes it (the memory quota and the log directory in the local settings, the synchronous standby names, the repointing of a standby during a failover, the rebuild of an old primary, the certificates a cluster change brings). Each of them read the settings, changed its own copy and wrote it back, so a change that another part made between the read and the write was silently undone, for example a quota change during a failover repoint. All of them now change only the fields they name, on the settings as they are at that moment, under one lock per instance; the rebuild of an old primary does so after the copy (pg_rewind or the base backup) has finished. Only the creation of a new instance still writes a whole record, because there is nothing else to lose.
Changed
- The builder pin files of the Fedora targets are renewed. The pinned packages of
fc44andfc45(made on 2026-11-30) had left the Fedora mirrors, which keep only the newest build of a package, so the RPM build of those two targets stopped inbuilder-packages.sh.rpm/pins/fc44.txtandrpm/pins/fc45.txtwere made again withpin-builder.shon 2026-12-02. The digests of the bundled extensions did not change (the builds check them against the registry), so no registry or generated file changed.
Upgrade
A rolling package or image upgrade from 0.2.1: replace the package (or the image) of the same major on every server, one at a time. Nothing else is to be done: no extension has a new version, there is no migration and no change to the REST contract.
Files
All package and image files are listed in kingres-SHA256SUMS, which is signed (kingres-SHA256SUMS.note); see below.
-
pg18/kingres_0.2.2+pg18-1_amd64.deb -
pg18/kingres-pg18-0.2.2-1.el9.x86_64.rpm(RHEL 9 family: AlmaLinux 9, Rocky Linux 9, RHEL 9;dnf install ./kingres-pg18-0.2.2-1.el9.x86_64.rpm) -
pg18/kingres-pg18-0.2.2-1.el10.x86_64.rpm(RHEL 10 family: AlmaLinux 10, Rocky Linux 10, RHEL 10;dnf install ./kingres-pg18-0.2.2-1.el10.x86_64.rpm) -
pg18/kingres-pg18-0.2.2-1.fc44.x86_64.rpm(Fedora 44;dnf install ./kingres-pg18-0.2.2-1.fc44.x86_64.rpm) -
pg18/kingres-pg18-0.2.2-1.fc45.x86_64.rpm(Fedora 45;dnf install ./kingres-pg18-0.2.2-1.fc45.x86_64.rpm) -
pg18/kingres-0.2.2-pg18-image.tar.gz(docker load, imagekingres:0.2.2-pg18) -
pg19/kingres_0.2.2+pg19-1_amd64.deb -
pg19/kingres-pg19-0.2.2-1.el9.x86_64.rpm(RHEL 9 family: AlmaLinux 9, Rocky Linux 9, RHEL 9;dnf install ./kingres-pg19-0.2.2-1.el9.x86_64.rpm) -
pg19/kingres-pg19-0.2.2-1.el10.x86_64.rpm(RHEL 10 family: AlmaLinux 10, Rocky Linux 10, RHEL 10;dnf install ./kingres-pg19-0.2.2-1.el10.x86_64.rpm) -
pg19/kingres-pg19-0.2.2-1.fc44.x86_64.rpm(Fedora 44;dnf install ./kingres-pg19-0.2.2-1.fc44.x86_64.rpm) -
pg19/kingres-pg19-0.2.2-1.fc45.x86_64.rpm(Fedora 45;dnf install ./kingres-pg19-0.2.2-1.fc45.x86_64.rpm) -
pg19/kingres-0.2.2-pg19-image.tar.gz(docker load, imagekingres:0.2.2-pg19) -
kingres-SHA256SUMS(the checksums of all the files above by their plain names;sha256sum -c kingres-SHA256SUMSin the folder that holds them) andkingres-SHA256SUMS.note, a signed note over it made with the release keybbwi8vQotQ8amSyMOM70mk1Q+JSSD2gmbBDxnYiTma0=;kingres-verify release verify --sums kingres-SHA256SUMS --note kingres-SHA256SUMS.note --key <the public key> --binary <file>checks a file against it. The packages and images themselves are not signed.
Checks that were run before the tags were made
Each line is a check of the release process (docs/dev/releases.md, "What a release is"), recorded by whoever ran it, with the commit it ran on.
| Major | Check | Result | Commit |
|---|---|---|---|
| 18 | tree-build | pass | 4c7f8dc |
| 19 | tree-build | pass | 10ff445 ... |
KingresDB 0.2.1 on PostgreSQL 19
Superseded by 0.2.2 (kingres-0.2.2-pg18, kingres-0.2.2-pg19), which fixes the automatic failover of a server that vanished. Install 0.2.2.
KingresDB 0.2.1
Released 2026-12-02, for PostgreSQL 18 and PostgreSQL 19 from one source.
| PostgreSQL 18 | PostgreSQL 19 | |
|---|---|---|
| Tag | kingres-0.2.1-pg18 |
kingres-0.2.1-pg19 |
| PostgreSQL | 18.7 | 19.0 |
| Commit | f709a17d5a8279f931bf15e6087dea213fc20658 |
7139e0939fc09eef6406a5dcea09a483841f6a07 |
A cluster runs one major. Choose it, and install every server of the cluster from the same one. There is no move between majors yet.
What is in this release
The links in this list are relative to the directory kingres/ of the tagged tree.
The first patch release of the 0.2 line, for PostgreSQL 18.7 and PostgreSQL 19.0, made from the main branches (kingres-18 and kingres-19). It brings back pg_cron (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, fixes the administration grant of roles made through the API, and pins the builders of the packages. The REST contract is 0.37.0 (199 operations; additive only, from 0.35.0). The extensions keep the versions of 0.2.0 (kingres_shard 0.10, kingres_timepart 0.4, kingres_ledger 0.3, kingres_columnar 0.2, kingres_sketch 1.0).
Added
- pg_cron is bundled again, and it can be switched on and used with the supported means. pg_cron 1.6.8 was taken out of 0.2.0 because it could not be switched on by any interface; it comes back with its files and digests (rebuilt in the pinned builders of the Ubuntu image and of the four RPM targets, both majors: every set equals the pin, see the work log), and with these changes. (1) The configuration API refuses every parameter that PostgreSQL hides from ordinary users (pg_cron marks
cron.use_background_workers,cron.max_running_jobsandcron.database_namesuperuser-only). A hidden parameter is now settable when a supported, bundled entry of the extension registry names it in its required settings: at the cluster level only, to a value that the rule of the entry accepts (checked at the preview, at the apply and again on each server), with a restart; every other hidden parameter stays refused, and a setting must carry the prefix of its own extension or library (the registry validator refuses another). (2) pg_cron works in the database ofcron.database_name(defaultpostgres, wherekingresdinstalls nothing): the setting must name a user database that has sharding on and that no drop task holds, and the plan of pg_cron blocks a database other than that one. (3) The switch-on of pg_cron givesUSAGEon the schemacronto the rolekingres_adminin the same transaction; the read-back of the install checks the grant and makes it again when it is missing; dropping the extension removes the schema and the grant. (4) The read-back and the list of an extension with the placement map group look at the primary of the map group and fail closed (no guess, statepartial) when the catalog does not say where it is. (5) The database thatcron.database_namenames cannot be dropped while the setting is stored or while any server still runs it (409 with the remedy; checked again in the drop task, and a configuration change cannot name a database that a drop task holds), and a preload library cannot be removed while a value is stored for one of its settings, at any level (409; this also applies topgauditandpgaudit.log: remove the value first). (6) The texts of the blockers describe the real order: preload and restart, then the settings on the Configuration page at the cluster level and a second restart, then switch on. The REST contract has no change of shape (descriptions only; its version is the 0.36.0 of phase 18). During a rolling upgrade a server that still runs the 0.2.0 build refuses the three settings andCREATE EXTENSION pg_cronuntil it is upgraded, so upgrade every server before pg_cron is set up. New cluster testsTestPgCronAndPgauditSwitchOnThroughTheAPIOnThreeServersand...OnAOneServerInstallwith the real files, including the boundary of the grant (what akingres_adminmember can and cannot schedule, and the role a job runs as). KINGRES_IMAGE_JOBSfor the image build (packaging/README.md):KINGRES_IMAGE_JOBS=8 packaging/docker/build-image.shholds the compile jobs of PostgreSQL and KingresDB in the image build to 8, the wayKINGRES_RPM_JOBSdoes for the RPMs (build argumentJOBSofdocker/Dockerfile; the default is still every CPU). The build of the bundled extensions in the same step does not take the value yet and still uses every CPU (seen in the release check of 0.2.1).- The check
anchorsof a ledger verification and the scheduled audit of the publication (phase 18, task 1; REST contract 0.36.0; ADR 0059).startLedgerVerificationwith"checks": ["anchors"]no longer answers 422: it verifies on the server every anchor record of the database (the digest from the stored checkpoint against the record and the publication; a WORM version read back from the store; an RFC 3161 token against the roots of its target; an OpenTimestamps proof recomputed from the digest and checked against a header the evidence carries) and stores a report with its evidence. A result isok,failedorincomplete, and incomplete (a store that cannot be reached, no CA bundle, no Bitcoin header, an anchor that is not final, no anchor target) is never shown as ok. A scheduled audit on the manager leader (every 24 hours by default;kingres-cli ledger audit; "Scheduled audit" on the Publication tab) re-reads every log from block 0, compares every block of the database with the published leaf, keeps the largest checkpoint it verified for each log (a wiped, shrunk or rolled back publication is altered), in passes of bounded work whose state, even inside the audit of one log, survives a leader change, and raisesledgerPublicationAltered(critical, and sticky until an administrator acknowledges it:acknowledgeLedgerPublicationAlteration,kingres-cli ledger audit-ack),ledgerPublicationBehind(warning) andledgerPublicationUnreadable(warning, critical after three audits). New operationsgetLedgerPublicationAudit,updateLedgerPublicationAudit,runLedgerPublicationAudit,acknowledgeLedgerPublicationAlteration,listLedgerCheckReportsandgetLedgerCheckReport; console reports;kingres-cli ledger check-reports,check-report,audit,audit-set,audit-nowandverify --checks. The server's own check is not the independent one:kingres-verify anchorswith an auditor's trust file is. The limitations say what the checks do not prove; runs against real authorities (task 2) are not done.
Changed
- The release notes say the checksums are signed. The section "Verifying what you downloaded" of
docs/release-notes-template.mdtold that the checksums are not signed; it now gives the check withkingres-verify release verifyand the release key from the verifier README, as the pages of 0.2.0 do, andtest-release.shasserts it. - The release script checks the executable bit of the packaging scripts.
packaging/release/release.shrunspackaging/test/test-modes.shon both release commits before anything is built and refuses the release, naming the files, when a*.shfile or Debian maintainer script ofkingres/packagingis not committed as 100755;packaging-modesis a required check of the record of the final checks (docs/dev/releases.md). - The package tests always end with their summary. A diagnostic read that fails (for example
watchdog.logmissing in a container) no longer endstest-compose.sh,test-deb.sh,test-rpm.shortest-image.shunderset -e, and a test script that stops early prints its counts and the command that ended it. - The REST contract text of
refusedno longer mentions a withheld entry (description text only; no schema, operation or enum changes; the contract version is the 0.36.0 of phase 18): the descriptions ofExtensionStatus,ExtensionClassandoverlapssay that a refused entry duplicates a component of KingresDB andoverlapsnames it. The generated console types carry the new text. - The source archives of the bundled extensions are fetched before the build, not during it.
packaging/extensions/fetch-sources.shreads the URL and SHA-256 of eachsource.yaml, fetches the archives once (retries, a clear error,--offline) into a cache outside the repository (KINGRES_EXT_CACHE, default~/.cache/kingres/ext-sources) and checks them;build-image.shandbuild-rpm.shgive them to the Docker build through the build context (the build downloads nothing and checks each archive again), andrelease.shfills the cache before its first build and refuses a release when it cannot. A dropped connection during a Docker build can no longer fail the release. - The packages of the RPM builders are pinned.
packaging/rpm/pins/<target>.txtlists the exact version of every package of the el9, el10, fc44 and fc45 builders;builder-packages.shinstalls them and checks that the installed set equals the list (AlmaLinux falls back to its vault when a pinned version has left the mirrors),rpm/pin-builder.shmakes and proves a pin file, andbuild-rpm.shrefuses a target without one. A builder rebuilt on another day no longer changes the bytes of the bundl...
KingresDB 0.2.1 on PostgreSQL 18
Superseded by 0.2.2 (kingres-0.2.2-pg18, kingres-0.2.2-pg19), which fixes the automatic failover of a server that vanished. Install 0.2.2.
KingresDB 0.2.1
Released 2026-12-02, for PostgreSQL 18 and PostgreSQL 19 from one source.
| PostgreSQL 18 | PostgreSQL 19 | |
|---|---|---|
| Tag | kingres-0.2.1-pg18 |
kingres-0.2.1-pg19 |
| PostgreSQL | 18.7 | 19.0 |
| Commit | f709a17d5a8279f931bf15e6087dea213fc20658 |
7139e0939fc09eef6406a5dcea09a483841f6a07 |
A cluster runs one major. Choose it, and install every server of the cluster from the same one. There is no move between majors yet.
What is in this release
The links in this list are relative to the directory kingres/ of the tagged tree.
The first patch release of the 0.2 line, for PostgreSQL 18.7 and PostgreSQL 19.0, made from the main branches (kingres-18 and kingres-19). It brings back pg_cron (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, fixes the administration grant of roles made through the API, and pins the builders of the packages. The REST contract is 0.37.0 (199 operations; additive only, from 0.35.0). The extensions keep the versions of 0.2.0 (kingres_shard 0.10, kingres_timepart 0.4, kingres_ledger 0.3, kingres_columnar 0.2, kingres_sketch 1.0).
Added
- pg_cron is bundled again, and it can be switched on and used with the supported means. pg_cron 1.6.8 was taken out of 0.2.0 because it could not be switched on by any interface; it comes back with its files and digests (rebuilt in the pinned builders of the Ubuntu image and of the four RPM targets, both majors: every set equals the pin, see the work log), and with these changes. (1) The configuration API refuses every parameter that PostgreSQL hides from ordinary users (pg_cron marks
cron.use_background_workers,cron.max_running_jobsandcron.database_namesuperuser-only). A hidden parameter is now settable when a supported, bundled entry of the extension registry names it in its required settings: at the cluster level only, to a value that the rule of the entry accepts (checked at the preview, at the apply and again on each server), with a restart; every other hidden parameter stays refused, and a setting must carry the prefix of its own extension or library (the registry validator refuses another). (2) pg_cron works in the database ofcron.database_name(defaultpostgres, wherekingresdinstalls nothing): the setting must name a user database that has sharding on and that no drop task holds, and the plan of pg_cron blocks a database other than that one. (3) The switch-on of pg_cron givesUSAGEon the schemacronto the rolekingres_adminin the same transaction; the read-back of the install checks the grant and makes it again when it is missing; dropping the extension removes the schema and the grant. (4) The read-back and the list of an extension with the placement map group look at the primary of the map group and fail closed (no guess, statepartial) when the catalog does not say where it is. (5) The database thatcron.database_namenames cannot be dropped while the setting is stored or while any server still runs it (409 with the remedy; checked again in the drop task, and a configuration change cannot name a database that a drop task holds), and a preload library cannot be removed while a value is stored for one of its settings, at any level (409; this also applies topgauditandpgaudit.log: remove the value first). (6) The texts of the blockers describe the real order: preload and restart, then the settings on the Configuration page at the cluster level and a second restart, then switch on. The REST contract has no change of shape (descriptions only; its version is the 0.36.0 of phase 18). During a rolling upgrade a server that still runs the 0.2.0 build refuses the three settings andCREATE EXTENSION pg_cronuntil it is upgraded, so upgrade every server before pg_cron is set up. New cluster testsTestPgCronAndPgauditSwitchOnThroughTheAPIOnThreeServersand...OnAOneServerInstallwith the real files, including the boundary of the grant (what akingres_adminmember can and cannot schedule, and the role a job runs as). KINGRES_IMAGE_JOBSfor the image build (packaging/README.md):KINGRES_IMAGE_JOBS=8 packaging/docker/build-image.shholds the compile jobs of PostgreSQL and KingresDB in the image build to 8, the wayKINGRES_RPM_JOBSdoes for the RPMs (build argumentJOBSofdocker/Dockerfile; the default is still every CPU). The build of the bundled extensions in the same step does not take the value yet and still uses every CPU (seen in the release check of 0.2.1).- The check
anchorsof a ledger verification and the scheduled audit of the publication (phase 18, task 1; REST contract 0.36.0; ADR 0059).startLedgerVerificationwith"checks": ["anchors"]no longer answers 422: it verifies on the server every anchor record of the database (the digest from the stored checkpoint against the record and the publication; a WORM version read back from the store; an RFC 3161 token against the roots of its target; an OpenTimestamps proof recomputed from the digest and checked against a header the evidence carries) and stores a report with its evidence. A result isok,failedorincomplete, and incomplete (a store that cannot be reached, no CA bundle, no Bitcoin header, an anchor that is not final, no anchor target) is never shown as ok. A scheduled audit on the manager leader (every 24 hours by default;kingres-cli ledger audit; "Scheduled audit" on the Publication tab) re-reads every log from block 0, compares every block of the database with the published leaf, keeps the largest checkpoint it verified for each log (a wiped, shrunk or rolled back publication is altered), in passes of bounded work whose state, even inside the audit of one log, survives a leader change, and raisesledgerPublicationAltered(critical, and sticky until an administrator acknowledges it:acknowledgeLedgerPublicationAlteration,kingres-cli ledger audit-ack),ledgerPublicationBehind(warning) andledgerPublicationUnreadable(warning, critical after three audits). New operationsgetLedgerPublicationAudit,updateLedgerPublicationAudit,runLedgerPublicationAudit,acknowledgeLedgerPublicationAlteration,listLedgerCheckReportsandgetLedgerCheckReport; console reports;kingres-cli ledger check-reports,check-report,audit,audit-set,audit-nowandverify --checks. The server's own check is not the independent one:kingres-verify anchorswith an auditor's trust file is. The limitations say what the checks do not prove; runs against real authorities (task 2) are not done.
Changed
- The release notes say the checksums are signed. The section "Verifying what you downloaded" of
docs/release-notes-template.mdtold that the checksums are not signed; it now gives the check withkingres-verify release verifyand the release key from the verifier README, as the pages of 0.2.0 do, andtest-release.shasserts it. - The release script checks the executable bit of the packaging scripts.
packaging/release/release.shrunspackaging/test/test-modes.shon both release commits before anything is built and refuses the release, naming the files, when a*.shfile or Debian maintainer script ofkingres/packagingis not committed as 100755;packaging-modesis a required check of the record of the final checks (docs/dev/releases.md). - The package tests always end with their summary. A diagnostic read that fails (for example
watchdog.logmissing in a container) no longer endstest-compose.sh,test-deb.sh,test-rpm.shortest-image.shunderset -e, and a test script that stops early prints its counts and the command that ended it. - The REST contract text of
refusedno longer mentions a withheld entry (description text only; no schema, operation or enum changes; the contract version is the 0.36.0 of phase 18): the descriptions ofExtensionStatus,ExtensionClassandoverlapssay that a refused entry duplicates a component of KingresDB andoverlapsnames it. The generated console types carry the new text. - The source archives of the bundled extensions are fetched before the build, not during it.
packaging/extensions/fetch-sources.shreads the URL and SHA-256 of eachsource.yaml, fetches the archives once (retries, a clear error,--offline) into a cache outside the repository (KINGRES_EXT_CACHE, default~/.cache/kingres/ext-sources) and checks them;build-image.shandbuild-rpm.shgive them to the Docker build through the build context (the build downloads nothing and checks each archive again), andrelease.shfills the cache before its first build and refuses a release when it cannot. A dropped connection during a Docker build can no longer fail the release. - The packages of the RPM builders are pinned.
packaging/rpm/pins/<target>.txtlists the exact version of every package of the el9, el10, fc44 and fc45 builders;builder-packages.shinstalls them and checks that the installed set equals the list (AlmaLinux falls back to its vault when a pinned version has left the mirrors),rpm/pin-builder.shmakes and proves a pin file, andbuild-rpm.shrefuses a target without one. A builder rebuilt on another day no longer changes the bytes of the bundl...
KingresDB 0.2.0 on PostgreSQL 19
Superseded by 0.2.2 (kingres-0.2.2-pg18, kingres-0.2.2-pg19), which fixes the automatic failover of a server that vanished. Install 0.2.2.
KingresDB 0.2.0 on PostgreSQL 19. The second release: management of third-party extensions with pgvector 0.8.7 and pgaudit bundled, kingres_shard 0.10 (more repartitioned joins, UPDATE ... FROM / DELETE ... USING on the shard groups), the command-line client kingres-cli, RPM packages for the RHEL 9 and 10 families and Fedora 44 and 45, images on Docker Hub, signed checksums, and Go 1.27.4 (GO-2026-6859). It supersedes 0.1.1 and 0.1.0.
| Tag | kingres-0.2.0-pg19 |
| PostgreSQL | 19.0 |
| Commit | fd07b560bfac3b7b608d2c5ed55bcee5bb314c0f |
| Released | 2026-11-30 |
| Docker Hub | kingres/kingres:0.2.0-pg19 (and latest-pg19) |
A cluster runs one major: install every server of a cluster from the same major. pg_cron is not part of 0.2.0 (built and tested, then withheld because it cannot be switched on through the control plane yet; planned for a later release). Read Known issues below before you change the preload list on a cluster with standbys.
Downloads on this page
-
kingres_0.2.0+pg19-1_amd64.deb: Debian package (Ubuntu 24.04, amd64):sudo apt install ./kingres_0.2.0+pg19-1_amd64.deb. -
kingres-pg19-0.2.0-1.el9.x86_64.rpm(RHEL 9 family),...el10...(RHEL 10 family),...fc44...,...fc45...(Fedora):sudo dnf install ./<file>. -
kingres-0.2.0-pg19-image.tar.gz: the container imagekingres:0.2.0-pg19(docker load -i kingres-0.2.0-pg19-image.tar.gz); the same image is on Docker Hub. -
kingres-SHA256SUMSandkingres-SHA256SUMS.note: the checksums of the packages and images of both majors, and a note over them signed with the release key. Check what you downloaded:sha256sum -c --ignore-missing kingres-SHA256SUMS kingres-verify release verify --sums kingres-SHA256SUMS --note kingres-SHA256SUMS.note --key kingres-verify-release+dc5771ec+AW28IvL0KLUPGpksjDjO9JpNUPiUkg9oJmwQ8Z2Ik5mt --binary kingres_0.2.0+pg19-1_amd64.debLook for
VERIFIED. Take the key from the project's documentation (verifier README, "The release key"), not from this page. Use akingres-verifybuilt from this tag.
What is in this release
The second release, for PostgreSQL 18.7 and PostgreSQL 19.0. It adds the management of third-party extensions, with pgvector 0.8.7 (the extension vector) and pgaudit bundled in the Debian package, the image and the RPM packages; kingres_shard 0.10 with more repartitioned joins and with UPDATE ... FROM and DELETE ... USING on the shard groups; kingres_timepart 0.4; the command-line client kingres-cli; RPM packages for the RHEL 9 and 10 families and for Fedora 44 and 45; the container images on Docker Hub (kingres/kingres); signed checksums of the product files (kingres-SHA256SUMS); and Go 1.27.4. The REST contract is 0.35.0 (192 operations; additive only). kingres_ledger 0.3, kingres_columnar 0.2 and kingres_sketch 1.0 are unchanged. The release 0.1.1 and the release 0.1.0 are superseded by this one; 0.1.0 has the wrong answer of an outer join that 0.1.1 fixes.
Added
kingres-cli, the command-line client of the REST API (kingres/control-plane/cmd/kingres-cli, code ininternal/cli; reference in its README, guide in docs/guide/operator-guide.md, section 2a). Sign in (login, a password only from a prompt, a file orKINGRES_PASSWORD; the token is kept in a per-user file of mode 0600), TLS trust with--ca-fileand--server-name, cluster status and topology, servers (add, update, drain, remove, failover and switchover), server groups, databases, schemas and tables (distribute, reference, undistribute, alter, move), rebalance and buckets, failover reports, restore and abandon, tasks (list, show, wait, cancel), alerts, audit, configuration (preview, apply, revert, history), ledger (status, digests, checkpoints, verification, proof export, anchors), export and import of a table and of a database (streamed uploads in chunks that continue after a break, downloads that continue and check the SHA-256), roles,query, andapi callfor every other operation. Human tables by default and--jsonfor scripts; stable exit codes (0 to 12, documented);--waitfollows a task with a timeout;--retryrepeats a call that got 503 or 429 withRetry-After. Requests are built from the generated operation table of the contract, and the tests fail for an operation that has no command and is not listed with a reason (internal/cli/coverage.go), and for a command whose arguments, flags or columns no longer match the schemas. The binary is in the Debian package (/usr/bin/kingres-cli, with a manual page) and in the image. Hardening after review: a download is made inFILE.partand gets its name only after the size and the SHA-256 were checked (an export without a SHA-256 is refused unless--allow-unverified); an upload refuses an offset that does not advance; a transfer that moves no byte for--stall-timeoutis ended; plainhttp://to another host, user names in addresses and./..as names are refused; the config file has an access list for the current user on Windows; Ctrl-C and SIGTERM end prompts, waits and transfers; text from the server is printed without control characters;api calltakes--headerand--secret-header. New dependency of this binary only:golang.org/x/term(andgolang.org/x/sys), for the password prompt without echo.- RPM packages for the RHEL 9 and 10 families and for Fedora 44 and 45 (packaging/rpm):
kingres-pg18-<version>-<revision><dist>.x86_64.rpmandkingres-pg19-...for four targets,.el9(RHEL 9, AlmaLinux 9, Rocky Linux 9),.el10(the same for 10),.fc44and.fc45(Fedora). Each is built in a container of its target (the base images are pinned by digest inpackaging/rpm/targets.txt, one line per target) from a clean snapshot of a commit, so the programs link against that system's glibc and libraries, with the same layout, unit, settings, users and behaviour as the Debian package; one spec with a few%ifblocks serves all targets. The two packages of a target conflict (one major per machine), a data directory of the other major refuses the package, the settings are%config(noreplace), the install needs no network, andrpmlintreports no error (the accepted messages are filtered with their reasons). Dependencies come from the distribution's own repositories (BaseOS, AppStream and CRB on the RHEL family,fedoraon Fedora); the one exception isrpmlinton el10, which AlmaLinux 10 does not have and which is taken from EPEL for the lint step only. RPM has no purge: the commands to delete everything are documented. SELinux: no policy module is needed according to the policy of each target, read withsesearchby the newtest/test-rpm-selinux.sh(the service runs inunconfined_service_t); this was not run with enforcing SELinux.test/test-rpm.shtests install, the cluster flow, restarts, upgrade, removal, reinstall and the two majors in a container of the target with systemd.release.shbuilds the RPMs of both majors for every target next to the Debian packages (--skip-rpmleaves them out, a checkpackage-rpm-<target>per target is required otherwise, and every commit must carry the packaging files and the target line) and lists them in the signedkingres-SHA256SUMS.build.shskipsdpkg-shlibdepswithKINGRES_SKIP_SHLIBDEPS=1, and the manual pages are generated by a script (build/man-pages.sh) that the Debian package and the RPM share. Every target compiles with the default standard of its compiler (the Fedora builder needed-std=gnu17only untilpg_noreturnwas moved before the storage class in the extensions). The release script keeps a minimum list of RPM targets (packaging/rpm/targets-minimum.txt;--drop-rpm-targetdrops one on purpose, with a warning) and requirespackage-rpm-selinux-<target>as well aspackage-rpm-<target>;rpmlintchecks a copy of the package. The RPMs carry the bundled extensions pgvector and pgaudit like the Debian package and the image (part of the main package,/opt/kingres/extensions/<project>with the links, and the licence notice, text, SBOM and ABI digests under/usr/share/doc/kingres/extensions), built against the target's ownpg_configby the unprivileged userkingres-ext, with one digest set per target and major in the registry (el9, el10, fc44 and fc45, both majors;release.shrefuses a target without a set unless--rpm-without-extensions NAMEsays it ships without them on purpose).test-rpm.shrunscheck-bundled.shin the installed package and checks the catalogue ofkingresd,CREATE EXTENSION vectorthrough the API and the preload change.
Changed
- Go 1.27.4 replaces Go 1.27.3 as the pinned toolchain of every Go program (
packaging/build/versions.envwith the new SHA-256,goline of bothgo.modfiles): Go 1.27.4 fixes GO-2026-6859 (net/http,MaxBytesReaderheader race).golang.org/x/sysmoves from v0.39.0 to v0.44.0 (GO-2026-5024,x/sys/windows, Windowskingres-clionly; not called).govulncheckreports nothing forcontrol-planeandverifier. - An upgrade of the Debian package no longer starts a service that was stopped on purpose. The
postinstdidrestarton an upgrade, which also starts a stopped unit (a node stopped for maintenance or taken out of the cluster came up with its databas...
KingresDB 0.2.0 on PostgreSQL 18
Superseded by 0.2.2 (kingres-0.2.2-pg18, kingres-0.2.2-pg19), which fixes the automatic failover of a server that vanished. Install 0.2.2.
KingresDB 0.2.0 on PostgreSQL 18. The second release: management of third-party extensions with pgvector 0.8.7 and pgaudit bundled, kingres_shard 0.10 (more repartitioned joins, UPDATE ... FROM / DELETE ... USING on the shard groups), the command-line client kingres-cli, RPM packages for the RHEL 9 and 10 families and Fedora 44 and 45, images on Docker Hub, signed checksums, and Go 1.27.4 (GO-2026-6859). It supersedes 0.1.1 and 0.1.0.
| Tag | kingres-0.2.0-pg18 |
| PostgreSQL | 18.7 |
| Commit | 3e5c5da47deb2ebd98323f23939ec615f1b3093d |
| Released | 2026-11-30 |
| Docker Hub | kingres/kingres:0.2.0-pg18 (and latest-pg18) |
A cluster runs one major: install every server of a cluster from the same major. pg_cron is not part of 0.2.0 (built and tested, then withheld because it cannot be switched on through the control plane yet; planned for a later release). Read Known issues below before you change the preload list on a cluster with standbys.
Downloads on this page
-
kingres_0.2.0+pg18-1_amd64.deb: Debian package (Ubuntu 24.04, amd64):sudo apt install ./kingres_0.2.0+pg18-1_amd64.deb. -
kingres-pg18-0.2.0-1.el9.x86_64.rpm(RHEL 9 family),...el10...(RHEL 10 family),...fc44...,...fc45...(Fedora):sudo dnf install ./<file>. -
kingres-0.2.0-pg18-image.tar.gz: the container imagekingres:0.2.0-pg18(docker load -i kingres-0.2.0-pg18-image.tar.gz); the same image is on Docker Hub. -
kingres-SHA256SUMSandkingres-SHA256SUMS.note: the checksums of the packages and images of both majors, and a note over them signed with the release key. Check what you downloaded:sha256sum -c --ignore-missing kingres-SHA256SUMS kingres-verify release verify --sums kingres-SHA256SUMS --note kingres-SHA256SUMS.note --key kingres-verify-release+dc5771ec+AW28IvL0KLUPGpksjDjO9JpNUPiUkg9oJmwQ8Z2Ik5mt --binary kingres_0.2.0+pg18-1_amd64.debLook for
VERIFIED. Take the key from the project's documentation (verifier README, "The release key"), not from this page. Use akingres-verifybuilt from this tag.
What is in this release
The second release, for PostgreSQL 18.7 and PostgreSQL 19.0. It adds the management of third-party extensions, with pgvector 0.8.7 (the extension vector) and pgaudit bundled in the Debian package, the image and the RPM packages; kingres_shard 0.10 with more repartitioned joins and with UPDATE ... FROM and DELETE ... USING on the shard groups; kingres_timepart 0.4; the command-line client kingres-cli; RPM packages for the RHEL 9 and 10 families and for Fedora 44 and 45; the container images on Docker Hub (kingres/kingres); signed checksums of the product files (kingres-SHA256SUMS); and Go 1.27.4. The REST contract is 0.35.0 (192 operations; additive only). kingres_ledger 0.3, kingres_columnar 0.2 and kingres_sketch 1.0 are unchanged. The release 0.1.1 and the release 0.1.0 are superseded by this one; 0.1.0 has the wrong answer of an outer join that 0.1.1 fixes.
Added
kingres-cli, the command-line client of the REST API (kingres/control-plane/cmd/kingres-cli, code ininternal/cli; reference in its README, guide in docs/guide/operator-guide.md, section 2a). Sign in (login, a password only from a prompt, a file orKINGRES_PASSWORD; the token is kept in a per-user file of mode 0600), TLS trust with--ca-fileand--server-name, cluster status and topology, servers (add, update, drain, remove, failover and switchover), server groups, databases, schemas and tables (distribute, reference, undistribute, alter, move), rebalance and buckets, failover reports, restore and abandon, tasks (list, show, wait, cancel), alerts, audit, configuration (preview, apply, revert, history), ledger (status, digests, checkpoints, verification, proof export, anchors), export and import of a table and of a database (streamed uploads in chunks that continue after a break, downloads that continue and check the SHA-256), roles,query, andapi callfor every other operation. Human tables by default and--jsonfor scripts; stable exit codes (0 to 12, documented);--waitfollows a task with a timeout;--retryrepeats a call that got 503 or 429 withRetry-After. Requests are built from the generated operation table of the contract, and the tests fail for an operation that has no command and is not listed with a reason (internal/cli/coverage.go), and for a command whose arguments, flags or columns no longer match the schemas. The binary is in the Debian package (/usr/bin/kingres-cli, with a manual page) and in the image. Hardening after review: a download is made inFILE.partand gets its name only after the size and the SHA-256 were checked (an export without a SHA-256 is refused unless--allow-unverified); an upload refuses an offset that does not advance; a transfer that moves no byte for--stall-timeoutis ended; plainhttp://to another host, user names in addresses and./..as names are refused; the config file has an access list for the current user on Windows; Ctrl-C and SIGTERM end prompts, waits and transfers; text from the server is printed without control characters;api calltakes--headerand--secret-header. New dependency of this binary only:golang.org/x/term(andgolang.org/x/sys), for the password prompt without echo.- RPM packages for the RHEL 9 and 10 families and for Fedora 44 and 45 (packaging/rpm):
kingres-pg18-<version>-<revision><dist>.x86_64.rpmandkingres-pg19-...for four targets,.el9(RHEL 9, AlmaLinux 9, Rocky Linux 9),.el10(the same for 10),.fc44and.fc45(Fedora). Each is built in a container of its target (the base images are pinned by digest inpackaging/rpm/targets.txt, one line per target) from a clean snapshot of a commit, so the programs link against that system's glibc and libraries, with the same layout, unit, settings, users and behaviour as the Debian package; one spec with a few%ifblocks serves all targets. The two packages of a target conflict (one major per machine), a data directory of the other major refuses the package, the settings are%config(noreplace), the install needs no network, andrpmlintreports no error (the accepted messages are filtered with their reasons). Dependencies come from the distribution's own repositories (BaseOS, AppStream and CRB on the RHEL family,fedoraon Fedora); the one exception isrpmlinton el10, which AlmaLinux 10 does not have and which is taken from EPEL for the lint step only. RPM has no purge: the commands to delete everything are documented. SELinux: no policy module is needed according to the policy of each target, read withsesearchby the newtest/test-rpm-selinux.sh(the service runs inunconfined_service_t); this was not run with enforcing SELinux.test/test-rpm.shtests install, the cluster flow, restarts, upgrade, removal, reinstall and the two majors in a container of the target with systemd.release.shbuilds the RPMs of both majors for every target next to the Debian packages (--skip-rpmleaves them out, a checkpackage-rpm-<target>per target is required otherwise, and every commit must carry the packaging files and the target line) and lists them in the signedkingres-SHA256SUMS.build.shskipsdpkg-shlibdepswithKINGRES_SKIP_SHLIBDEPS=1, and the manual pages are generated by a script (build/man-pages.sh) that the Debian package and the RPM share. Every target compiles with the default standard of its compiler (the Fedora builder needed-std=gnu17only untilpg_noreturnwas moved before the storage class in the extensions). The release script keeps a minimum list of RPM targets (packaging/rpm/targets-minimum.txt;--drop-rpm-targetdrops one on purpose, with a warning) and requirespackage-rpm-selinux-<target>as well aspackage-rpm-<target>;rpmlintchecks a copy of the package. The RPMs carry the bundled extensions pgvector and pgaudit like the Debian package and the image (part of the main package,/opt/kingres/extensions/<project>with the links, and the licence notice, text, SBOM and ABI digests under/usr/share/doc/kingres/extensions), built against the target's ownpg_configby the unprivileged userkingres-ext, with one digest set per target and major in the registry (el9, el10, fc44 and fc45, both majors;release.shrefuses a target without a set unless--rpm-without-extensions NAMEsays it ships without them on purpose).test-rpm.shrunscheck-bundled.shin the installed package and checks the catalogue ofkingresd,CREATE EXTENSION vectorthrough the API and the preload change.
Changed
- Go 1.27.4 replaces Go 1.27.3 as the pinned toolchain of every Go program (
packaging/build/versions.envwith the new SHA-256,goline of bothgo.modfiles): Go 1.27.4 fixes GO-2026-6859 (net/http,MaxBytesReaderheader race).golang.org/x/sysmoves from v0.39.0 to v0.44.0 (GO-2026-5024,x/sys/windows, Windowskingres-clionly; not called).govulncheckreports nothing forcontrol-planeandverifier. - An upgrade of the Debian package no longer starts a service that was stopped on purpose. The
postinstdidrestarton an upgrade, which also starts a stopped unit (a node stopped for maintenance or taken out of the cluster came up with its databas...
KingresDB 0.1.1 on PostgreSQL 19
Superseded by 0.2.0 (kingres-0.2.0-pg18, kingres-0.2.0-pg19). Install 0.2.0.
KingresDB 0.1.1 is a patch release of 0.1.0 that fixes a wrong answer. Every installation of 0.1.0 on the default settings is affected; upgrade every server (replace the package or the image and restart; no SQL change). Until then, SET kingres_shard.enable_pushdown = off avoids it (switching off only enable_pushdown_join is not enough). Details below.
| Tag | kingres-0.1.1-pg19 on the maintenance branch kingres-19-0.1 |
| PostgreSQL | 19.0 |
| Commit | c796d5f43f1b6151e97fbcd4223fda8e7ef96b4f |
| Released | 2026-11-28 (the CHANGELOG in this tag says 2026-11-29 by mistake) |
Downloads on this page
-
kingres_0.1.1+pg19-1_amd64.deb: the Debian package of KingresDB 0.1.1 on PostgreSQL 19. -
kingres-0.1.1-pg19-image.tar.gz: the container imagekingres:0.1.1-pg19(docker load -i kingres-0.1.1-pg19-image.tar.gz). -
kingres-SHA256SUMSandkingres-SHA256SUMS.note: the checksums of the packages and images of both majors (plain file names), and a note over them signed with the release key. Check the files you downloaded, in the folder that holds them:sha256sum -c --ignore-missing kingres-SHA256SUMS kingres-verify release verify --sums kingres-SHA256SUMS --note kingres-SHA256SUMS.note --key kingres-verify-release+dc5771ec+AW28IvL0KLUPGpksjDjO9JpNUPiUkg9oJmwQ8Z2Ik5mt --binary kingres_0.1.1+pg19-1_amd64.deb --binary kingres-0.1.1-pg19-image.tar.gzLook for the line
VERIFIED. Use akingres-verifybuilt from the source ofkingres-18after 2026-11-28 (the verifier of the 0.1.0 release does not accept file names with+and files above 256 MiB). Take the release key from the README of the verifier in the repository or from the wiki, not only from this page. The packages and images themselves are not signed. -
The standalone ledger verifier is unchanged; its signed release is on kingres-0.1.0-pg18.
Changes since 0.1.0
A patch release of 0.1.0 for PostgreSQL 18 and PostgreSQL 19. It fixes one wrong answer of the pushdown of an outer join and changes nothing else: no SQL script, kingres_shard stays 0.9, the REST contract stays 0.34.0, and kingresd, the console and the other extensions are as in 0.1.0.
Fixed
- A wrong answer of an outer join that has two distributed tables in one arm. In 0.1.0 a pushdown (a closed query, a partial aggregation, or the rows of a join) of a statement such as
(a CROSS JOIN b) LEFT JOIN c ON c.k = a.k AND c.k = b.kreturned too few rows or a too small aggregate: with 6 rows in each ofaandbacount(*)returned 14 instead of 36. The analysis took the equalities of the ON clause of the outer join for equalities that pairawithb; they only say which rows ofcmatch a row of the other arm, and every pair of a row ofawith a row ofbexists, while a shard group only has the pairs of its own rows.- Who is affected. Every installation on the default settings (all five pushdown switches are on): a statement on distributed tables of one colocation group (
kthe distribution key) whose outer join (LEFT,RIGHTorFULL) has an arm with two or more of those tables that no other equality of the statement joins on their distribution keys (no equality inWHERE, and none in an inner join), and whose ON clause equates the key of another table with the keys of both. A join with one table on each side, a chain of joins on the keys, every inner join, and tables of different colocation groups are not affected. - The fix. An outer join with such an arm is not pushed down and the complete scan answers it (ADR 0022);
EXPLAINshows the scan, and the debug message of the planner (SET client_min_messages = debug1) says "an outer join has an arm with distributed tables that are not joined on their distribution keys inside the arm". The check runs after the equalities of everyWHEREclause and of every inner join have been taken into account, so a statement that 0.1.0 answered correctly because such an equality aligns the two tables (... LEFT JOIN c ON c.k = a.k WHERE a.k = b.k) is still pushed down. Test:t/284_outer_join_arm_pairing.pl; the debug messages of three statements inexpected/repartition_plans.outnow name this reason. - Workaround for 0.1.0.
SET kingres_shard.enable_pushdown = off(the master switch; in a session, withALTER ROLE ... SETorALTER DATABASE ... SET, or inpostgresql.confof every server) makes every statement take the complete scan on every path, at the price of no pushdown at all. Switching off onlykingres_shard.enable_pushdown_joinis not enough: the closed query and the partial aggregation still return the wrong answer. The three switchesenable_pushdown_closed,enable_pushdown_joinandenable_partial_aggregation, all off, are equivalent to the master switch for this fault. Rewriting the statement so that the arm is joined on its keys (WHERE a.k = b.k, ora JOIN b ON a.k = b.k) also gives the right answer, when that is what the statement means. - Upgrade. Replace the package (or the image) of the same major with 0.1.1 and restart; there is no SQL change, no
ALTER EXTENSIONand no change of the catalog or of the REST contract. Upgrade every server of a cluster: a server that is still on 0.1.0 pushes the wrong shape when it plans the statement.
- Who is affected. Every installation on the default settings (all five pushdown switches are on): a statement on distributed tables of one colocation group (
KingresDB 0.1.1 on PostgreSQL 18
Superseded by 0.2.0 (kingres-0.2.0-pg18, kingres-0.2.0-pg19). Install 0.2.0.
KingresDB 0.1.1 is a patch release of 0.1.0 that fixes a wrong answer. Every installation of 0.1.0 on the default settings is affected; upgrade every server (replace the package or the image and restart; no SQL change). Until then, SET kingres_shard.enable_pushdown = off avoids it (switching off only enable_pushdown_join is not enough). Details below.
| Tag | kingres-0.1.1-pg18 on the maintenance branch kingres-18-0.1 |
| PostgreSQL | 18.7 |
| Commit | b70e7d0c90ac8bb31585ac248a848b55a93ae4f2 |
| Released | 2026-11-28 (the CHANGELOG in this tag says 2026-11-29 by mistake) |
Downloads on this page
-
kingres_0.1.1+pg18-1_amd64.deb: the Debian package of KingresDB 0.1.1 on PostgreSQL 18. -
kingres-0.1.1-pg18-image.tar.gz: the container imagekingres:0.1.1-pg18(docker load -i kingres-0.1.1-pg18-image.tar.gz). -
kingres-SHA256SUMSandkingres-SHA256SUMS.note: the checksums of the packages and images of both majors (plain file names), and a note over them signed with the release key. Check the files you downloaded, in the folder that holds them:sha256sum -c --ignore-missing kingres-SHA256SUMS kingres-verify release verify --sums kingres-SHA256SUMS --note kingres-SHA256SUMS.note --key kingres-verify-release+dc5771ec+AW28IvL0KLUPGpksjDjO9JpNUPiUkg9oJmwQ8Z2Ik5mt --binary kingres_0.1.1+pg18-1_amd64.deb --binary kingres-0.1.1-pg18-image.tar.gzLook for the line
VERIFIED. Use akingres-verifybuilt from the source ofkingres-18after 2026-11-28 (the verifier of the 0.1.0 release does not accept file names with+and files above 256 MiB). Take the release key from the README of the verifier in the repository or from the wiki, not only from this page. The packages and images themselves are not signed. -
The standalone ledger verifier is unchanged; its signed release is on kingres-0.1.0-pg18.
Changes since 0.1.0
A patch release of 0.1.0 for PostgreSQL 18 and PostgreSQL 19. It fixes one wrong answer of the pushdown of an outer join and changes nothing else: no SQL script, kingres_shard stays 0.9, the REST contract stays 0.34.0, and kingresd, the console and the other extensions are as in 0.1.0.
Fixed
- A wrong answer of an outer join that has two distributed tables in one arm. In 0.1.0 a pushdown (a closed query, a partial aggregation, or the rows of a join) of a statement such as
(a CROSS JOIN b) LEFT JOIN c ON c.k = a.k AND c.k = b.kreturned too few rows or a too small aggregate: with 6 rows in each ofaandbacount(*)returned 14 instead of 36. The analysis took the equalities of the ON clause of the outer join for equalities that pairawithb; they only say which rows ofcmatch a row of the other arm, and every pair of a row ofawith a row ofbexists, while a shard group only has the pairs of its own rows.- Who is affected. Every installation on the default settings (all five pushdown switches are on): a statement on distributed tables of one colocation group (
kthe distribution key) whose outer join (LEFT,RIGHTorFULL) has an arm with two or more of those tables that no other equality of the statement joins on their distribution keys (no equality inWHERE, and none in an inner join), and whose ON clause equates the key of another table with the keys of both. A join with one table on each side, a chain of joins on the keys, every inner join, and tables of different colocation groups are not affected. - The fix. An outer join with such an arm is not pushed down and the complete scan answers it (ADR 0022);
EXPLAINshows the scan, and the debug message of the planner (SET client_min_messages = debug1) says "an outer join has an arm with distributed tables that are not joined on their distribution keys inside the arm". The check runs after the equalities of everyWHEREclause and of every inner join have been taken into account, so a statement that 0.1.0 answered correctly because such an equality aligns the two tables (... LEFT JOIN c ON c.k = a.k WHERE a.k = b.k) is still pushed down. Test:t/284_outer_join_arm_pairing.pl; the debug messages of three statements inexpected/repartition_plans.outnow name this reason. - Workaround for 0.1.0.
SET kingres_shard.enable_pushdown = off(the master switch; in a session, withALTER ROLE ... SETorALTER DATABASE ... SET, or inpostgresql.confof every server) makes every statement take the complete scan on every path, at the price of no pushdown at all. Switching off onlykingres_shard.enable_pushdown_joinis not enough: the closed query and the partial aggregation still return the wrong answer. The three switchesenable_pushdown_closed,enable_pushdown_joinandenable_partial_aggregation, all off, are equivalent to the master switch for this fault. Rewriting the statement so that the arm is joined on its keys (WHERE a.k = b.k, ora JOIN b ON a.k = b.k) also gives the right answer, when that is what the statement means. - Upgrade. Replace the package (or the image) of the same major with 0.1.1 and restart; there is no SQL change, no
ALTER EXTENSIONand no change of the catalog or of the REST contract. Upgrade every server of a cluster: a server that is still on 0.1.0 pushes the wrong shape when it plans the statement.
- Who is affected. Every installation on the default settings (all five pushdown switches are on): a statement on distributed tables of one colocation group (
KingresDB 0.1.0 on PostgreSQL 19
Superseded by 0.2.0 (kingres-0.2.0-pg18, kingres-0.2.0-pg19). Install 0.2.0.
Superseded by 0.1.1 (2026-11-28): this release returns a wrong answer for a pushdown of an outer join whose arm holds two distributed tables that no other equality joins on their keys, e.g.
(a CROSS JOIN b) LEFT JOIN c ON c.k = a.k AND c.k = b.k, on the default settings. Install kingres-0.1.1-pg19 on every server (replace the package or image and restart; no SQL change). Until then:SET kingres_shard.enable_pushdown = off(switching off onlyenable_pushdown_joinis not enough).
Downloads on this page
kingres_0.1.0+pg19-1_amd64.deb: the Debian package of KingresDB 0.1.0 on PostgreSQL 19.kingres-0.1.0-pg19-image.tar.gz: the container imagekingres:0.1.0-pg19(docker load -i kingres-0.1.0-pg19-image.tar.gz).SHA256SUMS: the checksums of the files of both majors, with the pathspg18/andpg19/. GitHub lists the files without folders: put the files you downloaded into a folderpg19/next toSHA256SUMSand runsha256sum -c --ignore-missing SHA256SUMS. These checksums are not signed.- The standalone ledger verifier
kingres-verifyand its signed checksums are attached to the releasekingres-0.1.0-pg18; it is the same for both majors.
KingresDB 0.1.0
Released 2026-11-28, for PostgreSQL 18 and PostgreSQL 19 from one source.
| PostgreSQL 18 | PostgreSQL 19 | |
|---|---|---|
| Tag | kingres-0.1.0-pg18 |
kingres-0.1.0-pg19 |
| PostgreSQL | 18.7 | 19.0 |
| Commit | dc2b7f10471e253611c31274b3d2017271106d81 |
d34c6c10264ae000f61d2eec81c664585dd0906f |
A cluster runs one major. Choose it, and install every server of the cluster from the same one. There is no move between majors yet.
What is in this release
The links in this list are relative to the directory kingres/ of the tagged tree.
The first release. KingresDB is a thin fork of PostgreSQL 18.7 and PostgreSQL 19.0 with sharding, a tamper-evident ledger, a control plane and a web console, and extensions for analytics. The REST contract is 0.34.0 (178 operations on 142 paths).
Added
- Bases. PostgreSQL 18.7 (
kingres-18, upstream tagREL_18_7) and PostgreSQL 19.0 (kingres-19, upstream tagREL_19_0). - Fork and packaging.
- A thin fork with a small register of core patches (docs/dev/core-patches.md).
- One source of every extension for PostgreSQL 18 and 19 (ADR 0023).
- KingresDB code is under the AGPL-3.0-only; PostgreSQL code keeps its licence (ADR 0024).
- A reproducible release build, a Debian package per major (
kingres_<version>+pg18-<revision>_amd64.deb,+pg19), a container image per major (kingres:<version>-pg18,-pg19), a three-node development cluster in Docker Compose (kingres/packaging), and a release script.
- Sharding (
kingres_shard0.9).- Tables split into hash buckets over several servers; writes and reads on any server; two-phase commit with recovery; reference tables; distributed DDL; bucket moves with logical replication.
- Standbys,
promote_node, prepared transactions across a failover, distributed deadlock detection and coordinated restore points. - Pushdown: closed queries, partial aggregation, sorted streams with limit and joins of colocated tables run in the shard groups, and a row router handles multi-row
INSERT,INSERT ... SELECTandCOPY FROM. The complete scan stays as the fallback for every query (ADR 0022). - Table lifecycle: distribute a table that already holds rows, in blocking and online form; turn a table back into an ordinary table; change the distribution column, the bucket count or the colocation group; distribute user-partitioned tables; carry dependent views and storage parameters.
- Elasticity: split a bucket, weights per server, plans by disk size.
- A bucket move or split does not drop an old copy that objects of its owner depend on (a view, a materialized view, a foreign key, a function on its row type). The copy is left in place, the record of the move says what depends on it,
check_cluster()reportsorphan_blocked, and the next cleanup pass after the owner dropped the dependents finishes the move. The locks of a move or split are bounded and are never left behind, and the recovery worker does not undo a move or split that its session still runs. - Distributed schemas: a schema is placed and moved as a unit, schemas are part of the rebalance plan and the drain, and
check_clusterchecks them. - Analytics: repartitioned joins on columns other than the distribution column,
MERGEon distributed tables, columnar tables that can be distributed and moved (blocking variants), approximatecount(DISTINCT)throughkingres_sketch. - Ledger tables are refused by
create_distributed_tableandcreate_reference_table(SQLSTATEKS016). - Own SQLSTATEs
KS017toKS022for the refusals that the control plane tells apart: no receiving shard group, unreadable bucket sizes, a busy bucket, a pinned schema, a failed verification, and a call on a node that is not the map group primary. A split of a table without a primary key is refused with0A000.kingresdmatches the code, not the wording (see "SQLSTATEs of the answers" in the README ofkingres_shard).
- Control plane (
kingresd, REST contract 0.34.0). Cluster creation and joining, servers, roles and grants, network access, databases, tasks, alerts, logs and metrics (also a Prometheus endpoint,GET /metrics, outside the REST contract; it needs a bearer token of a session with thekingres_statsrole or the scrape token). Server groups (racks or zones), the audit log of sign-ins and administrative actions (merged across the servers) and a SQL workbench (a row limit, a time limit and cancel of a running statement) are part of the contract. The manager leader runs on the primary of the map group, the cluster state is in a system database, and certificates are renewed and revoked.- Starting an instance whose postmaster is still shutting down waits for the shutdown (up to the stop timeout) and then starts it, or reports an error.
- The orderly stop of a node (
kingresd -stop-instances, the container stop, the service stop) asks every instance for its fast shutdown at once, primaries first, and writes the stand-down of each primary's lease watchdog right after PostgreSQL accepted the request; a failure for one instance never keeps the others from being asked, and every error is reported. - At a start, the primary of a group waits for its group lease when the standby list of the node names a ready standby for that group, even if the lease record does not name the group yet; an unreadable standby list stops
kingresdat start with an error. - Rebalance as a task with stop, resume and reports. Strategies by bucket count or disk size, a threshold, weights, an automatic mode (off by default; a run makes one move at a time), draining a server and splitting a bucket.
- A drain hands the map group over by a planned switchover (contract 0.27.0).
- A rebalance is held back, or refused with
group_degradedunlessforceis sent, while a standby lags by more thanmaxStandbyLagBytes. - The removal of a server that a rebalance emptied a moment ago forces the cleanup of the moves that are still in the cleaning phase (their old copies are dropped before the retention delay; this is logged and audited as
cleanupMovedBucketsForced) and tries again, for about two minutes, while a move of its groups is still cleaning; the task says what it waits for. It does not fail when another cleanup holds one of those moves at that moment. - Distributed schemas: distribute, move and make local as tasks, and the sharding mode of a database. A rebalance and a drain plan and move schemas as items of the plan (contract 0.31.0):
kindandschemaNameappear in the plan, the progress and the report. A drain that would need to move a schema that cannot move (pinned by a ledger table, or a table without a key) is refused before a task exists. - Table lifecycle as tasks: distribute, make a table ordinary again, change its distribution, create a partition.
- Distribute with related tables (contract 0.32.0):
listRelatedTablesgives the plan: the ordinary tables that foreign keys link to a table (the whole closure, not through a table that is already distributed), the column each would get, the keys, and what would stop it.distributeTabletakesrelatedTablesand distributes them with the table in one task, colocated with it. The keys between the tables are taken out, each table is distributed in a step of its own, and the keys are added backNOT VALIDand validated. A failure puts the keys back where it can and names the ones it could not. Only the blocking copy is used.Table.operationinlistTablesandgetTablesays which long operation runs on a table, including operations that were started from SQL. The console shows it as a badge on the row and turns the conflicting buttons off. Design: docs/design/shard-phase9.md.
- Time partitioning of distributed tables (contract 0.25.0,
kingres_timepart0.3): policies, plans and runs on a user-partitioned distributed table. Partitions are created ahead on every server that holds a bucket, old leaves are converted to columnar storage, and expired partitions are dropped or detached. - Analytics (contract 0.18.0):...
KingresDB 0.1.0 on PostgreSQL 18
Superseded by 0.2.0 (kingres-0.2.0-pg18, kingres-0.2.0-pg19). Install 0.2.0.
Superseded by 0.1.1 (2026-11-28): this release returns a wrong answer for a pushdown of an outer join whose arm holds two distributed tables that no other equality joins on their keys, e.g.
(a CROSS JOIN b) LEFT JOIN c ON c.k = a.k AND c.k = b.k, on the default settings. Install kingres-0.1.1-pg18 on every server (replace the package or image and restart; no SQL change). Until then:SET kingres_shard.enable_pushdown = off(switching off onlyenable_pushdown_joinis not enough).
Downloads on this page
-
kingres_0.1.0+pg18-1_amd64.deb: the Debian package of KingresDB 0.1.0 on PostgreSQL 18. -
kingres-0.1.0-pg18-image.tar.gz: the container imagekingres:0.1.0-pg18(docker load -i kingres-0.1.0-pg18-image.tar.gz). -
SHA256SUMS: the checksums of the files of both majors, with the pathspg18/andpg19/. GitHub lists the files without folders: put the files you downloaded into a folderpg18/next toSHA256SUMSand runsha256sum -c --ignore-missing SHA256SUMS. These checksums are not signed. -
The standalone ledger verifier
kingres-verify(attached to this release only; the release of PostgreSQL 19 has the same verifier):kingres-verify-linux-amd64,kingres-verify-linux-arm64,kingres-verify-darwin-arm64,kingres-verify-windows-amd64.exeandRELEASE, with their checksums signed by the release key askingres-verify-SHA256SUMSandkingres-verify-SHA256SUMS.note(the README of the verifier calls themSHA256SUMSandSHA256SUMS.note; they are renamed here because a release page has one name for each file). Check a binary, andRELEASE, with:kingres-verify release verify --sums kingres-verify-SHA256SUMS --note kingres-verify-SHA256SUMS.note \ --key kingres-verify-release+dc5771ec+AW28IvL0KLUPGpksjDjO9JpNUPiUkg9oJmwQ8Z2Ik5mt \ --binary kingres-verify-linux-amd64and look for the line
VERIFIED. Take the release key from the README of the verifier in the repository or from the wiki, not only from this page. You can also build the verifier yourself from this tag; the build is reproducible.
KingresDB 0.1.0
Released 2026-11-28, for PostgreSQL 18 and PostgreSQL 19 from one source.
| PostgreSQL 18 | PostgreSQL 19 | |
|---|---|---|
| Tag | kingres-0.1.0-pg18 |
kingres-0.1.0-pg19 |
| PostgreSQL | 18.7 | 19.0 |
| Commit | dc2b7f10471e253611c31274b3d2017271106d81 |
d34c6c10264ae000f61d2eec81c664585dd0906f |
A cluster runs one major. Choose it, and install every server of the cluster from the same one. There is no move between majors yet.
What is in this release
The links in this list are relative to the directory kingres/ of the tagged tree.
The first release. KingresDB is a thin fork of PostgreSQL 18.7 and PostgreSQL 19.0 with sharding, a tamper-evident ledger, a control plane and a web console, and extensions for analytics. The REST contract is 0.34.0 (178 operations on 142 paths).
Added
- Bases. PostgreSQL 18.7 (
kingres-18, upstream tagREL_18_7) and PostgreSQL 19.0 (kingres-19, upstream tagREL_19_0). - Fork and packaging.
- A thin fork with a small register of core patches (docs/dev/core-patches.md).
- One source of every extension for PostgreSQL 18 and 19 (ADR 0023).
- KingresDB code is under the AGPL-3.0-only; PostgreSQL code keeps its licence (ADR 0024).
- A reproducible release build, a Debian package per major (
kingres_<version>+pg18-<revision>_amd64.deb,+pg19), a container image per major (kingres:<version>-pg18,-pg19), a three-node development cluster in Docker Compose (kingres/packaging), and a release script.
- Sharding (
kingres_shard0.9).- Tables split into hash buckets over several servers; writes and reads on any server; two-phase commit with recovery; reference tables; distributed DDL; bucket moves with logical replication.
- Standbys,
promote_node, prepared transactions across a failover, distributed deadlock detection and coordinated restore points. - Pushdown: closed queries, partial aggregation, sorted streams with limit and joins of colocated tables run in the shard groups, and a row router handles multi-row
INSERT,INSERT ... SELECTandCOPY FROM. The complete scan stays as the fallback for every query (ADR 0022). - Table lifecycle: distribute a table that already holds rows, in blocking and online form; turn a table back into an ordinary table; change the distribution column, the bucket count or the colocation group; distribute user-partitioned tables; carry dependent views and storage parameters.
- Elasticity: split a bucket, weights per server, plans by disk size.
- A bucket move or split does not drop an old copy that objects of its owner depend on (a view, a materialized view, a foreign key, a function on its row type). The copy is left in place, the record of the move says what depends on it,
check_cluster()reportsorphan_blocked, and the next cleanup pass after the owner dropped the dependents finishes the move. The locks of a move or split are bounded and are never left behind, and the recovery worker does not undo a move or split that its session still runs. - Distributed schemas: a schema is placed and moved as a unit, schemas are part of the rebalance plan and the drain, and
check_clusterchecks them. - Analytics: repartitioned joins on columns other than the distribution column,
MERGEon distributed tables, columnar tables that can be distributed and moved (blocking variants), approximatecount(DISTINCT)throughkingres_sketch. - Ledger tables are refused by
create_distributed_tableandcreate_reference_table(SQLSTATEKS016). - Own SQLSTATEs
KS017toKS022for the refusals that the control plane tells apart: no receiving shard group, unreadable bucket sizes, a busy bucket, a pinned schema, a failed verification, and a call on a node that is not the map group primary. A split of a table without a primary key is refused with0A000.kingresdmatches the code, not the wording (see "SQLSTATEs of the answers" in the README ofkingres_shard).
- Control plane (
kingresd, REST contract 0.34.0). Cluster creation and joining, servers, roles and grants, network access, databases, tasks, alerts, logs and metrics (also a Prometheus endpoint,GET /metrics, outside the REST contract; it needs a bearer token of a session with thekingres_statsrole or the scrape token). Server groups (racks or zones), the audit log of sign-ins and administrative actions (merged across the servers) and a SQL workbench (a row limit, a time limit and cancel of a running statement) are part of the contract. The manager leader runs on the primary of the map group, the cluster state is in a system database, and certificates are renewed and revoked.- Starting an instance whose postmaster is still shutting down waits for the shutdown (up to the stop timeout) and then starts it, or reports an error.
- The orderly stop of a node (
kingresd -stop-instances, the container stop, the service stop) asks every instance for its fast shutdown at once, primaries first, and writes the stand-down of each primary's lease watchdog right after PostgreSQL accepted the request; a failure for one instance never keeps the others from being asked, and every error is reported. - At a start, the primary of a group waits for its group lease when the standby list of the node names a ready standby for that group, even if the lease record does not name the group yet; an unreadable standby list stops
kingresdat start with an error. - Rebalance as a task with stop, resume and reports. Strategies by bucket count or disk size, a threshold, weights, an automatic mode (off by default; a run makes one move at a time), draining a server and splitting a bucket.
- A drain hands the map group over by a planned switchover (contract 0.27.0).
- A rebalance is held back, or refused with
group_degradedunlessforceis sent, while a standby lags by more thanmaxStandbyLagBytes. - The removal of a server that a rebalance emptied a moment ago forces the cleanup of the moves that are still in the cleaning phase (their old copies are dropped before the retention delay; this is logged and audited as
cleanupMovedBucketsForced) and tries again, for about two minutes, while a move of its groups is still cleaning; the task says what it waits for. It does not fail when another cleanup holds one of those moves at that moment. - Distributed schemas: distribute, move and make local as tasks, and the sharding mode of a database. A rebalance and a drain plan and move schemas as items of the plan (contract 0.31.0):
kindandschemaNameappear in the plan, the progress and the report. A drain that would need to move a schema that cannot move (pinned by a ledger table, or a table without a key) is refused before a task exists. - Table lifecycle as tasks: distribute, make a table ordinary again, change its distribution, create a partition.
- Distribute with related tables (contract 0.32.0):
listRelatedTablesgives the plan: the ordinary tables that foreign keys link to a table (the whole closure, not through a table that is already distributed), the column each would get, the keys, and what would stop it.distributeTabletakesrelatedTablesand distributes them with the table in one task, colocated...