GitHubWaitlist

Changelog / Chronos DB

Chronos DB 0.8.0

The first release under the Functional Source License (FSL-1.1-ALv2), SERIALIZABLE transactions, transactions that span worlds, and agent memory

Beta23 changesDownloads

The first release under the Functional Source License (FSL-1.1-ALv2), SERIALIZABLE transactions, transactions that span worlds, and agent memory. Chronos may now be used, changed and shipped inside anything except a product or service that competes with it, and each version becomes Apache-2.0 two years after its release; 0.6.2 and earlier stay under the Business Source License 1.1. SERIALIZABLE refuses a commit whose reads another commit changed (40001), a transaction may SET its world and commit several worlds' changes at once, and agents get long-term memory in the engine itself. Also here: a background scrub, VACUUM FULL that frees disk, enum types on the wire, pg_dump schemas that load, a first batch of hot-path speedups, and security and correctness fixes. 0.7.0 was tagged but never published: its changes, listed under 0.7.0 below, ship for the first time in this release. Nothing changes in how rows are stored: 0.8.0 opens and writes data format 8 as 0.6.0 does. Built and signed on the maintainer's Mac as 0.6.2 was.

Release checks: the supply-chain step (no advisory, every licence on the list; SBOM attached as chronos-0.8.0.cdx.json); the release gate (crash points, kill -9 under concurrent merges, simulated interleavings, fuzz tests at 100,000 rounds); a 10-minute soak; the whole suite on the Mac (2,833 tests, no failure outside tests/known_failures.txt); the Linux gate passed on Ubuntu 24.04, x86_64, against Postgres 16.16 (commit 3a82eeb: 2,853 tests, 2,841 passed, 12 known failures, 17 skipped; S3 against moto, doctests, the installer test and the latency budgets passed; summary attached as linux-gate-summary.md; a first run failed pg::a_client_that_stops_reading_lets_its_locks_go on timing and the rerun passed). Drivers and ORMs: psycopg, SQLAlchemy, Django, Alembic, LangGraph, the pytest fixture, node-postgres, Knex, Prisma, TypeORM, Sequelize, JDBC, Flyway and Hibernate passed; pgx and GORM were not run (no Go on the machine). The cargo fuzz targets were not run (no nightly toolchain on the machine).

  • Agent memory. Long-term memory for agents, like mem0 or Supermemory, built on the engine's own search and versioning: MCP tools and HTTP ops memory_add, memory_search, memory_update, memory_forget, memory_get, memory_profile and memory_history, and SQL's memory_search(query, scope [, k [, options]]). Memories are rows of agent_memory, scoped by user_id, agent_id, session_id and app_id. Search fuses BM25 and the vector index with recency and importance and returns each score's signals for the agent's LLM to rank; memory_add suggests update:<id> or duplicate:<id> for near memories. The engine makes no LLM or embedding calls: callers send vectors. Every memory has a history (Core::key_history: every write to a row the log holds, across the worlds of its line), can be searched as_of a past time, and can be written in an agent's own world and merged under its rules. See docs/memory.md.
  • Security: a table dropped and made again by the same owner is another table AS OF a moment. FROM t AS OF <time> and USE main@<time> told a table apart from the one of its name now by its owner only, so a table its owner dropped and made again was read in the past with the new table's grants: a role granted SELECT on the old one was refused, and one granted it on the new one read the old one's rows. Now the stamp of a relation's making (_sonos_made, kept since DROP ... CASCADE lists objects in the order they were made) tells them apart: an old table is read with its own grants as they were then, the new one with its grants now. Nothing new is stored: a table made before those stamps were kept (an older folder) has none, and is told apart by its owner, as before (CHRONOS-368).
  • Security: a user's operator on a built-in symbol no longer replaces the built-in. CHRONOS-357 kept bare comparisons on the built-in, but any other symbol a role made an operator of (|| on text, text; ->, &&, ...) was called for every role's bare use of it. As in Postgres, pg_catalog's operator now hides a user's of the same symbol and operand types: 'a' || 'b' is the built-in for every role, and the user's is called only as OPERATOR(public.||), or for operands of its own types. OPERATOR(public.+) (and -, *, /, %, ^) reaches a user's operator too, where it read as the built-in (CHRONOS-366).
  • Operators in the catalog, and their owners. pg_operator now has a row for each operator CREATE OPERATOR made, with its schema, owner, operand and result types and function, beside the built-in ones (it had the built-ins alone). CREATE OPERATOR needs USAGE on its operand types (42501 permission denied for type t), as Postgres asks. ALTER OPERATOR ... OWNER TO role was accepted and forgotten; the new owner is now kept, across a restart too, needs a role the owner may become (42501) that is there (42704), and only the owner may run it (CHRONOS-367).
  • Several statements in one string: split at COMMIT as in Postgres, and all or nothing over HTTP too. Behaviour change. A simple Query of several statements now follows Postgres's implicit transaction block all the way: insert ...; commit; insert ... commits what came before the COMMIT (with Postgres's warning that no transaction was in progress) and makes what comes after it a block of its own; a ROLLBACK there undoes what came before it; a BEGIN there makes the block the client's, with what ran before it. What can't run in a transaction block (VACUUM, CREATE/DROP DATABASE, CREATE INDEX CONCURRENTLY, REINDEX ... CONCURRENTLY, DISCARD ALL, ALTER SYSTEM, ...) fails with 25001 among other statements, as in Postgres (alone it runs as before), and SAVEPOINT, RELEASE, ROLLBACK TO and COMMIT AND CHAIN there are 25P01; either undoes what came before it in the block. Before, a string holding any of these, or its own BEGIN/COMMIT, or a COPY, ran each statement on its own. A world's statement (CREATE WORLD, USE WORLD, MERGE WORLD, ...), which Postgres has none of, commits what came before it, runs on its own, and the statements after it are a block of their own, so create world x; use world x; ... works as before. The HTTP API's sql op (POST /v1/sql) runs its statements the same way: several are one transaction, and a failure undoes the ones before it, where each committed as it ran (CHRONOS-369).
  • Text search configurations and dictionaries have Chronos's own oids (CHRONOS-371). Each snowball language's configuration is 15100 up and its _stem dictionary 15000 up (english 15106, english_stem 15006), in place of the oids one Postgres 16 build's initdb happened to give them (13639, 13638), which differ between Postgres builds; simple keeps Postgres's fixed 3748 and 3765. regconfig and regdictionary read and show names through them, and a value stored with the old oid still names its object. The differential tests compare these objects by name.
  • An agent's abandoned transaction lets go after an hour. An agent's Postgres connection (not the guest's, not the database's own users') idle inside a transaction for an hour, with no max_idle_ms and no idle_in_transaction_session_timeout of its own, is dropped (FATAL 25P03) and its transaction rolled back, its row intents and locks let go. Before, it held them until the connection closed. SHOW and pg_settings still say Postgres's 0; a max_idle_ms or a timeout of its own changes it. docs/production-checklist.md now says what is on by default and why each other limit (statement_timeout, max_worlds, world_idle_ttl, the disk and memory caps, the idle timeouts for people) stays off (engine #399).
  • Dependencies: a stale advisory ignore dropped. deny.toml ignored RUSTSEC-2026-0386 (tokio AsyncFd unsound) as having no fixed release, but it is fixed in tokio 1.53.3 and later, and 1.54.1 is locked, so the ignore went: a new tokio advisory now fails the gate instead of hiding behind it. RELEASING.md says where the SBOM lands under ctest exec (the shared build folder, not the worktree's target/) and gives the two checks' commands. The four crates the 2026-11-10 assessment flagged are all at fixed versions: rustls-webpki 0.103.17 (RUSTSEC-2026-0382 fixed in 0.103.16), webpki-root-certs 1.0.12 (-0383, 1.0.10), ctutils 0.4.8 (-0385, 0.4.4), tokio 1.54.1 (-0384, 1.54.1; -0386, 1.53.3) (engine #408).
  • Correctness fixes from the backlog (#431). Silent wrong results: hashoidvector reads a negative oid spelling as oidin does; ADOPT into a world set keeps its max_live; DROP COLUMN of a column two unique constraints INCLUDE keeps the keys that rest on them; a generated column or CHECK naming its table (t.a) keeps working after RENAME TO; one ALTER TABLE dropping several key columns with CASCADE no longer brings back a foreign key an earlier action dropped; DROP SCHEMA CASCADE drops another schema's text search configuration that maps one of its dictionaries, which before lost the token. Undo: a PL/pgSQL block or function SET clause takes back a set_config() queued inside it, counter restarts and DDL a body ran go with its block or refused statement, and ROLLBACK TO a savepoint takes back the unique checks put off since. Dependencies: DROP TYPE drops (or without CASCADE is refused by) its transforms; DROP FUNCTION is refused by (or with CASCADE drops) a CHECK, generated column or default that calls it; DROP OWNED BY the owner of a built-in function refuses as Postgres does (2BP01). Checks: a partition key's operator class has to exist (42704), and DROP OPERATOR CLASS of a missing one is 42704 too; ALTER COLUMN TYPE of a bloom index's column needs a bloom class for the new type; SET CONSTRAINTS keeps the schema it is given and reaches partitions' copies of a unique constraint. DISABLE TRIGGER ALL's state follows its foreign keys' renames and drops. An expression index part keeps its made access method's default class, so DROP OPERATOR CLASS sees it and ALTER COLUMN TYPE swaps it. Attribute notation alone in a statement (SELECT p.f FROM pt p) and a field of an overloaded call's row ((g(1)).a) are read. pg_proc shows the owner and grants kept for a built-in function.
  • Security: five findings of the 2026-11-28 review. table_to_xml, query_to_xml (and their _and_xmlschema, schema and database forms), ts_stat and ts_rewrite ran their query in a session of nobody's, the database owner's: an agent held to one tenant read every tenant's rows, past row-level security, masks and column grants. They now run as the session that called them, its agent and role. MCP safe mode (and a rehearsal's confined session) refused CREATE ROLE and the like at the front door only: a DO block's EXECUTE, or a function's body, ran them as the database's own user; refused there too now (42501). A merge keeps to the world's merge policy, not only the merging agent's: TRANSFER WORLD by an agent keeps the old owner's policy on the world, and an agent merging another agent's world keeps to its owner's (admin agents and people as before). Behaviour change: an agent without unmask may no longer write values into a column masked WITH HASH or WITH FORMAT, or set such a mask: written values read back as their hash, a chosen-plaintext oracle (and a unique violation told whether a guessed value existed). search(table, words) read whole rows past grants, row-level security and a tenant hold: it now needs SELECT on the table, and is refused (42501) where row security or a tenant hold limits the session (a query with @@ reads the table through them). chronos serve with no token now says at start that loopback is trust.
  • Drivers and ORMs: smoke scripts, and what they found (CHRONOS-306). tools/drivers.sh runs every client in tests/drivers/ whose toolchain is on the machine (TypeORM, Sequelize, GORM, JDBC with Flyway and Hibernate, beside the existing ones); RELEASING.md runs it before a tag. Fixed from the runs: a three-part name whose first part is the current database ("main"."public"."t", as TypeORM writes) reads as public.t; a quoted built-in typname casts (x::"regtype", "int4"); catalog columns of type name are typed so, so array_agg(attname) is a name[]; and SET ROLE to the login's own name when it is no role (Flyway, putting a connection back) is taken.
  • Faster hot paths, first batch (CHRONOS-372). See docs/designs/speed-plan.md:
    • A diff no longer looks up again the rows the tree diff already read.
    • A row read by key reads its table's schema once, not twice.
    • The memory cap check reads the process's memory at most every 5 ms, not before every statement.
    • A commit's sync shares the log file instead of duplicating its descriptor, and with synchronous_commit off it no longer asks for one.
    • pg_stat_statements does its allocating outside its lock.
    • pg_stat_activity's row is updated in place.
    • A fork with max_worlds or a fork limit set no longer counts every world.
    • examples/micro.rs times single operations in process (p50, p99, p99.9).
  • VACUUM FULL takes deleted rows off disk. Cleanup rewrites a page file only once less than half of it is in use, so a deleted row's bytes could stay in one indefinitely. VACUUM FULL (any table list, or none: it is the whole database's page files) now checkpoints, then rewrites every page file that holds a page nothing needs, here and in the bucket with --remote. Rows history still keeps (within history_retention, or a pinned checkpoint) and rows a world still has stay; lower history_retention first to take those too. Checkpoints, cleanup and big statements wait while it runs. Only a superuser or the database's owner may run it, and an agent needs admin (42501). Plain VACUUM is unchanged. See docs/security.md, "Data deletion, residency and keys" (CHRONOS-373).
  • A refresh on the timer skips MySQL and MariaDB tables with no commit since the last (CHRONOS-291). As beside Postgres since 0.7.0, serve --refresh-every first reads each attached table's UPDATE_TIME and CREATE_TIME (information_schema.TABLES, MySQL 8's statistics cache off for the read) and doesn't read the rows of tables where neither moved; their columns are still checked, and the answer lists them in unread. A time in the second of the read isn't trusted, so a commit in that second is read at the next refresh. Partitioned tables, tables with no UPDATE_TIME (none kept since MySQL started), the hourly full read and chronos refresh read every row.
  • An engine started by a gateway leading several says the lease's epoch (CHRONOS-320): chronos serve with CHRONOS_LEADER_EPOCH set prints started by the gateway leading at epoch N as it starts, so its log names the leader whose engine it is. Only said: writes aren't checked against it.
  • License: the Functional Source License (FSL-1.1-ALv2). From this version on, the engine and the chronos binaries are under the Functional Source License 1.1, ALv2 Future License, in place of the Business Source License 1.1. Any use is allowed (production, inside a company, free and open projects, contributions) except a Competing Use: making Chronos DB available to others in a commercial product or service that substitutes for it, such as a hosted database service. Each version becomes Apache 2.0 two years after it is published (it was four). Versions up to 0.7.0 stay under the Business Source License 1.1. See LICENSE and public/TERMS.md.
  • Background scrub. ALTER SYSTEM SET scrub_interval = '7 days' (off by default) has a running database re-read every page still needed and every log record, checking each against its hash or checksum, at scrub_mb_per_sec (10 MB a second by default) and without holding up checkpoints. It reports, never repairs: SHOW METRICS gives scrub_last_run, scrub_errors, scrub_pages and scrub_running, and the log event=scrub_corrupt and event=scrub_done. Db::scrub() runs one now. Cloud-backed databases aren't scrubbed. Salvage (chronos verify --salvage) now keeps each world's owner, expiry, pin and scope too. (CHRONOS-271)
  • Enum columns are typed as their enum on the wire. RowDescription now carries an enum column's own type oid (the one pg_type gives it), as Postgres does, instead of text's 25, so drivers look its labels up. A client that read enum columns as plain text may need the enum registered (or a ::text cast in the query); psycopg and node-postgres return unknown types as strings. Arrays of an enum are still text[]. The compatibility page now says what VACUUM and ANALYZE record (pg_class's counts, no pg_stats rows). (CHRONOS-290)
  • SERIALIZABLE isolation. BEGIN ISOLATION LEVEL SERIALIZABLE (and SET TRANSACTION, SET SESSION CHARACTERISTICS, default_transaction_isolation) is taken instead of refused (0A000). It runs on REPEATABLE READ's one snapshot and keeps what the transaction reads (rows, key ranges, scan filters, whole tables); COMMIT checks them, and if a transaction that committed since it began changed any of it, COMMIT is 40001 could not serialize access due to read/write dependencies among transactions and nothing lands. Write skew (two doctors going off call) and Hermitage's G2-item and G2 are refused as in Postgres; a transaction that wrote nothing commits as it read. It can refuse more than Postgres's SSI (any rw-dependency on a committed write, at any level), never fewer. (docs/designs/qm-fit.md)
  • A pg_dump of an app's schema loads. An IMMUTABLE function of the user's in a generated column, an index expression and an index's WHERE (run read-only in the statement's world where no query runs it); 'simple'::regconfig in an index expression; a schema-qualified call as an index column (btree (public.f(x))); a multi-column GIN with btree_gin's scalars beside a tsvector (kept with no entries, as a jsonb one is); TRUNCATE statement triggers, BEFORE and AFTER, with TG_OP = 'TRUNCATE' and tgtype 32; and ON DELETE SET NULL (col) on a foreign key whose other columns are in the primary key.
  • Tests: a pg-boss queue over the wire. Eight connections fetching with FOR UPDATE SKIP LOCKED take every job once; a row held by an open transaction is skipped and comes back on rollback; session advisory locks go when their connection closes; pg_advisory_xact_lock serializes writers; LISTEN survives a dropped connection (tests/queue_fit.rs).
  • A transaction may switch worlds. SWITCH WORLD, USE WORLD and SET [LOCAL] chronos.world inside a transaction move it to the other world instead of failing with 25001. Each world gets its own fork of the transaction when first reached, savepoints span every world, and ROLLBACK drops them all. COMMIT checks every world's changes, then lands them in one step under the log lock: no other commit comes between them, and on recovery all or none replay (the merges are grouped by an _tx_group metadata record; no log format change). An agent may switch only to worlds it may change, or read in a READ ONLY transaction. API: Core::merge_all.
  • An array of names goes out as name[]. array_agg(a.attname) and other arrays of name went to clients typed text[] (1009) instead of Postgres's name[] (1003). node-postgres parses a text[] but leaves a name[] as text, so Sequelize's sync() failed reading indexes (text.replace is not a function). Found by the 0.8.0 driver run.
Chronos DB 0.8.0 · Chronos