Chronos/DBWaitlist

Changelog / Chronos DB

Chronos DB 0.4.1

Fixes from the first run of `chronos init` against Chronos Cloud, attach that keeps up with Postgres, and agents held to one tenant

Beta8 changesDownloads

Fixes from the first run of chronos init against Chronos Cloud, attach that keeps up with Postgres, and agents held to one tenant.

Changed from 0.4: EXPLAIN (COSTS OFF) shows how Chronos runs a statement by default. 0.2 to 0.4 showed the plan PostgreSQL 16 would choose for simple statements (one table read, partitions pruned), which Chronos may not run that way: it can answer an equality from its search index where that plan has a Filter, and read every partition where it shows them pruned. Now that plan is shown only when asked for, SET chronos.explain = postgres, with a NOTICE that Chronos may run the query differently; chronos (the default) always shows Chronos's steps, and any other value is 22023. SHOW chronos.explain, SHOW ALL and pg_settings list it. See EXPLAIN.

  • chronos init and chronos cloud login keep waiting through a slow network. While you approve the sign-in code, the CLI asks the API every few seconds whether you have; one ask that got no answer within 30 seconds ended the command (Resource temporarily unavailable (os error 35) on macOS). It tries again now, until the code expires, and a timeout says no answer within 30 seconds. The help no longer says the sign-in is GitHub's: it's a code you approve at chronos.2090.tech/device, signed in with an email code or GitHub.
  • World names with a dash work unquoted in SQL. MERGE BRANCH add-todos and DIFF task-1 read add-todos and task-1 as names, where they used to fail with world names with a dash need quotes; agents fork such names and write them as they are. A dash with nothing after it (task-) still says how to quote it.
  • diff puts a new table in words. The shell's diff and MCP's diff showed a table made in a world as its catalog row (+ _sonos_tables/todos {"checks":[],"columns":[...]}); they show + create table todos (id integer not null, title text not null) now, views, functions and the like as DIFF describes them, and a type or domain made or dropped in a world with its definition (+ type mood ...), where it used to be left out. The rows behind constraints, indexes and sequences are left out.
  • Attach: refresh. chronos refresh <folder>, chronos serve --refresh-every 5m and HTTP refresh bring main up to Postgres: rows changed, added or removed there straight since the attach (or the last refresh) come into main in one change, compared as the write-back compares them, under its lock. A world that changed one of those rows too settles it at its merge as any conflict. A table whose shape changed in Postgres is left as it was, and named. HTTP attached says what a folder is attached to and how old its untouched rows may be. Before, main stayed as old as the attach until you attached again into a new folder.
  • Attach: undo a merge that reached Postgres. UNDO MERGE of a merge into main of an attached folder was refused. It now puts the rows back through Postgres, as a merge of a world of main: every row locked and compared there, a row changed since a conflict, nothing written.
  • Attach: merges up to 50,000 rows by default, sent 5,000 at a time in one transaction (was 10,000, in one statement per table); CHRONOS_ATTACH_MAX_ROWS raises it to 1,000,000.
  • Agents held to one tenant, and tokens that expire. CREATE AGENT run_42 WITH (tenant = 'org_id = 42', valid_for = '1 hour') (HTTP create_agent with tenant and valid_for): the agent reads and changes, in every world, only rows of tables with that column holding that value, whatever its role or the table's own row security; every world it forks is declared that tenant's; it sees changes as rows only of its own worlds (DIFF, dry runs, CHECK READS, history; SHOW REVIEWS, SHOW AUDIT refused); its token stops working after valid_for. SHOW AGENTS has tenant and expires columns. For a product whose agents act for one customer at a time.
  • Postgres compatibility: two more batches of the PostgreSQL 16 regression suite. Tablespaces, composite types in ALTER TYPE, views over joins, DDL locks, type-name casts, EXPLAIN and SET in PL/pgSQL, and table row types as function parameters (89.12% of expected lines, 60 files exact).

The macOS builds need macOS 13 or later, as for 0.2.0.

Chronos DB 0.4.1 · Chronos