Skip to Content
ReleasesUpgrade to 0.8

Upgrade to KalamDB 0.8

KalamDB 0.8 changes storage, Raft, WebSocket frames, and SDK contracts. Move older applications to a fresh 0.8 database; do not point the new server at a 0.6 or 0.7.1 data directory.

Prepare a KalamDB upgrade

  1. Keep the old server binary, configuration, data directory, and a tested backup. Record server, CLI, SDK, and generated-client versions.
  2. Stop application writes for the final export. Export application schemas and data using the old version’s supported tools. Preserve users, permissions, routine definitions, external files, and sequence state as appropriate.
  3. Start 0.8 with an empty, separate data directory and separate ports. Startup will not delete the old directory for you.
  4. Review schema SQL using the changes below, apply it through the CLI migration workflow, and import data with parameterized insert batches.
  5. Regenerate application clients, rebuild server functions, and test as ordinary users before redirecting traffic.

A physical backup from the old storage cohort is a recovery option for that old version, not a supported format conversion into 0.8. PostgreSQL wire COPY IN / COPY OUT is not supported; do not assume a default COPY-based dump can be replayed unchanged.

Update SQL contracts

Earlier patternCurrent pattern
CREATE USER TABLE app.notes (...)CREATE TABLE app.notes (...) WITH (TYPE = 'USER')
CREATE SHARED TABLE ...CREATE TABLE ... WITH (TYPE = 'SHARED')
CREATE STREAM TABLE ...CREATE TABLE ... WITH (TYPE = 'STREAM', TTL_SECONDS = 60)
CREATE PROCEDURE ... RETURNS ...CREATE FUNCTION ... RETURNS ..., invoked with SELECT
Namespace-first application schemasCREATE SCHEMA and SET search_path; the namespace creation alias remains accepted
Implicit use of default as publicSeparate schema names; qualify objects or set the search path

Procedures use CALL and OUT / INOUT parameters. Functions return values and can be used in SQL expressions. Review routine grants after changing routine kinds.

Align SDKs and serialization

Install the 0.8 server, CLI, and SDK cohort together. Internal SDK ranges are >=0.8.0 <0.9.0. Run kalam schema gen and rebuild applications; do not carry generated 0.7 clients forward.

WebSocket serialization=msgpack is rejected. Use the SDK’s supported 0.8 transport, JSON text, or serialization=domain for the KDOM binary frame. Generated routine calls use /v1/functions/{schema}/{name} and the same shared binary format when binary encoding is selected.

Verify before switching traffic

Compare row counts and representative typed values, then test insert/update/delete, sequence allocation, RLS with two identities, external-provider login, routine calls, file downloads, and subscription reconnects. Restart the new instance and repeat the reads. Take and restore a new 0.8 backup.

Keep the old instance available for rollback until the migration is accepted. Writes made only on the new instance need an explicit reconciliation plan before reverting traffic.

Next: CLI migrations. Reference: Backup and restore.