Chronos DB 0.7.0
TLS on by default in the container, a round of security fixes, and a supply-chain gate
TLS on by default in the container, a round of security fixes, and a supply-chain gate. A Docker container started without a certificate now exits instead of serving passwords, tokens and rows in plain text; plain HTTP stays available, said out loud, with the ports bound to 127.0.0.1. No agent decides the review of its own world, a role that isn't a superuser no longer changes WAL shipping or reads the database's state, a database's files and a world's transforms and operators are their owner's alone, a table read AS OF a moment is checked as it was then, and the Postgres and HTTP ports take request and connection rate limits. The release gains a Linux gate and a supply-chain step: tools/supply-chain.sh fails the build on a vulnerability advisory, an off-list licence or a crate from outside crates.io, and writes a CycloneDX SBOM; the gate reaches every crash point for the first time, and most test files now build as one binary. Client certificates authenticate on the Postgres port, and chronos rehearse tries a migration on a copy first. Nothing changes in how rows are stored: 0.7.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.
- Tests: crash points in release test builds. The crash points and fault hooks (
CHRONOS_CRASH_AT,CHRONOS_ATTACH_CRASH,CHRONOS_FAIL_PAGE_WRITES, the sequence stall) are behind atest-hooksfeature that every test build turns on (the crate dev-depends on itself with it), so the 12 crash and recovery tests that skipped themselves in release builds run there too, among them #374's attached-recovery fix (recovery_applies_intent_payload_without_validation). A shipped binary still has none (no dev-dependencies). The release gates of 0.6.0, 0.6.1 and 0.6.2 never reached a crash point: theircrashand attached-recovery tests returned early and were logged as passed. This release's gate is the first to run them. Each crash test now also fails unless its child stopped at the crash point (aborted), not merely exited with an error. - Tests: one binary for most test files.
tests/all.rsholds 234 of the 269 test files as modules (autotests = false); a file's tests are<file>::<test>in it (cargo nextest run -E 'test(/^pgdiff::/)'). The 35 the release gate and CI run by name, that count allocations with their own global allocator, or that set the process's environment (which plaincargo testwould share acrossall) stay binaries of their own. - Tests: a merge into MongoDB waits for a majority of the replica set, shown against a real three-member set (
attach_mongo::a_merge_waits_for_a_majority_of_the_replica_set, CHRONOS_TEST_MONGO_RS): with both secondaries fsync-locked the merge doesn't return; unlocked, it lands. review_parse::nested_calls_take_time_by_their_depth_not_its_poweris ignored in debug builds, where 30 levels pass the parser's stack budget (sized for release frames); release runs it.- Breaking for the Docker image: TLS by default. The
Dockerfile's default command no longer passes--insecure-no-tls, so a container started withoutCHRONOS_TLS_CERTandCHRONOS_TLS_KEYexits, refusing to serve0.0.0.0in plain text, instead of serving passwords, tokens and rows unencrypted to whatever the ports are published on. Plain text is still there, said out loud:docker run ... chronos serve /data --pg 0.0.0.0:5432 --listen 0.0.0.0:7070 --insecure-no-tlswith the ports published on127.0.0.1(engine #407). - Tests: the known failures are committed.
tests/known_failures.txtlists the 62 tests that fail against the release Mac's local Postgres 17 (59pgdiff,copy::same_as_postgres,schemas,index_build), in nextest's<binary>\t<test>form. The release gate compares a full run against it, and it changes only by a reviewed commit. Before this a full run onmainreplaced the list with its own failures, so it could never report a new one (engine #380). - Dependencies: no known advisories, and a gate step that keeps it so. Bumped
rustls-webpki0.103.17,webpki-root-certs1.0.12,ctutils0.4.8,quinn-proto0.11.19,quinn-udp0.5.16,url2.5.9 andtokio1.54.1 (RUSTSEC-2026-0382, -0383, -0385, -0523, -0524, -0538, -0592), andrusqlite0.41 for the benchmark example (bundled SQLite, RUSTSEC-2026-0459).tools/supply-chain.shrunscargo deny(advisories, the licence list indeny.toml, crates.io only) andcargo audit, and writes a CycloneDX SBOM; RELEASING.md makes it a release step and the SBOM a release file (engine #408). - Security: no agent decides the review of its own world.
REVIEW WORLD(and thereviewop and MCP tool) refused an agent that wasn't the policy's reviewer or an admin, but an admin agent could approve the merge it had just had held, and a reviewer its own. Now an agent that owns the world, or whose merge was held, is refused (42501) for approve, reject and pass, as a proposal's proposer already is; another reviewer, another admin agent or a person decides. A hold now records the agent whose merge it was (by); holds made before keep only the owner check (engine #404). - Corrections to earlier entries. Released sections stay as they were written; these lines correct them.
- 0.5.0's "five security fixes" and "Security fixes from a review of what a role or agent with little can do" fixed what that review found; they don't close security work. Still open, as docs/security.md lists: a panic can leave internal locks poisoned until a restart; an agent made by an older Chronos needs one HTTP request before it can log in with SCRAM; an md5 role and the mock salts show which names exist; there are no request rate limits beyond agents' quotas and the login backoff. The storage engine has had no outside review. Since fixed: SQL nested past 400 levels is refused (54001), and
$Npast$65535(42P02). - 0.6.0's "upgrade replicas before the primary": Chronos has no replicas (one process writes a folder). Back up before upgrading if you may need to go back.
- 0.6.0's "Not yet covered by a test": a crash at every step of a merge is now tested (
tests/crash.rscut_at_every_merge_step), and crash recovery beside an attached database too (tests/attach.rsa_crash_around_commit_is_settled,crash_matrix_postgres,recovery_applies_intent_payload_without_validation).tests/durability.rsreplays logs the 0.5.5 binary wrote; one segment mixing 0.5.5 and 0.6.0 records still has no test of its own.
- 0.5.0's "five security fixes" and "Security fixes from a review of what a role or agent with little can do" fixed what that review found; they don't close security work. Still open, as docs/security.md lists: a panic can leave internal locks poisoned until a restart; an agent made by an older Chronos needs one HTTP request before it can log in with SCRAM; an md5 role and the mock salts show which names exist; there are no request rate limits beyond agents' quotas and the login backoff. The storage engine has had no outside review. Since fixed: SQL nested past 400 levels is refused (54001), and
chronos servenames the limits still off, and a production checklist. As it starts,servewarns of each limit a server shared by agents wants that is off (statement_timeout,max_worlds,world_idle_ttl,protect_main,CHRONOS_MAX_DISK_BYTES,CHRONOS_MAX_MEMORY_BYTES). No default changed: a cap has no right value without the host's size, and discarding idle worlds by default would lose unmerged work.docs/production-checklist.mdgives a starting value for each, and the tokens, TLS, encryption, anchor and backups to set up (engine #399).- Security: a role that isn't a superuser no longer changes WAL shipping or reads the database's state.
ALTER SYSTEM SET wal_shippingandwal_shipping_delaywere open to every role, and so wereSHOW wal_shipping,history_retention, the system settings (max_worlds,outbox_keep_payloads, ...),STORAGE,DISK,METRICS,SECURITY AUDIT,READERS,OUTBOX DISCARDED(the payloads of discarded effects),MERGE w EFFECTS,WORLDS,BRANCHESandASSIGN WORLD: they are now42501 ... needs a superuser. Every statement is now classified one by one, with no default, so a new one doesn't build until it is. A session's own settings and Postgres's (SHOW search_path,server_version,synchronous_commit, ...) stay open (engine #403). - An agent merges its world into a table with masked columns. An agent without
unmaskhad every merge refused (403, 42501) when its world changed a table with a masked column, through the HTTP and MCP API: masking a column made the table read-only for agents, and failed every Gateway proposal on it (gateway #94). A merge writes rows and answers with counts, so it now goes through; row-level security and tenants still apply. What shows rows as they are is still refused (get,find,diff, a dry run), and a merge refused for conflicts shows each row's versions as(masked)when the table has masked columns in the world or in the one it merges into (and its key too, when a key column is masked). Any other refusal of such a merge that can quote rows (a conflict over MCP, one with an attached database, a unique or foreign key, a stale read, a failed merge check) keeps only what can't: how many conflicts, the first sentence, or the check's name. A merge with nointois now checked against the row-level security of the parent it merges into, as one withintowas. - Tests: the differential tests run against Postgres 16, and only explained failures are known.
tests/PGDIFF.mdnames the reference Postgres (16, C locale, UTC,pg_trgm, port 5416) and how to start one. The known failures, taken against the Mac's Postgres 17, go from 62 to 15, each with its reason intests/known_failures.txt; the five that are Chronos's are engine #450 to #454. The index-build crash test aborts at a crash point after a known part of the build (CHRONOS_CRASH_LONG_BATCH,test-hooksonly) instead of a timed kill that could miss (engine #382). - Release: a Linux gate.
tools/linux-gate.shruns every test on Debian or Ubuntu with the reference Postgres 16, the S3 store against a local MinIO, the doctests, the installer's test and the latency budgets. It writes a summary that marks each failing test known or new. The public repository can run it on GitHub's x86_64 runner (workflowlinux-gate), and RELEASING.md makes it a gate step: 0.6.0 to 0.6.2 were tested on macOS only (CHRONOS-325, engine #381). - Release: the Linux gate runs the S3 tests against moto, a local S3 server from PyPI; MinIO no longer publishes free binaries, so the gate stopped at its download.
- Release: the first full Linux gate run (Ubuntu 24.04 x86_64, 2026-11-24, commit c50bb2f): doctests, the installer test and both latency budgets pass; 2672 tests ran, 2652 passed, 10 known failures, 10 new. Of the new ones, 1 was the gate lacking a
postgresrole (fixed here), 7 differ by how the reference Postgres was built (CHRONOS-344), 1 is a stalled client on Linux (CHRONOS-345), 1 a remote test under load (CHRONOS-346). - Tests: a soak of attached write-back, and a log mixing 0.5.5 and 0.6 records.
tests/attach_soak.rs(tools/attach-soak.sh <pg|mysql|mongo> <minutes>) merges round after round of random updates, inserts and deletes beside Postgres, MySQL or MongoDB, killing the merge at a random write-back step or a checkpoint at a random file step. After each round, main must hold exactly the source's rows, each merge must be in the source and main's ledger once, and the world must be gone exactly when the source committed. Each round's seed is printed, and a failure keeps its folder.a_log_mixing_055_and_this_release_replays_beside_postgresopens a folder the 0.5.5 release wrote beside Postgres (tests/fixtures/legacy-055-attach). It merges into the same log segment, merges 0.5.5's open world and is killed after Postgres commits, then checks main against Postgres after recovery, a reopen and a checkpoint (CHRONOS-296, engine #391). - A database's files are its owner's only. Its folders are created
0700and its files0600, whatever theumask(they took it before:0644under the usual022); backups the same. Thechronosbinary sets itsumaskto077as it starts, as Postgres does. A database folder others can read or enter is made0700when it opens, with a warning line.install.shchecks the build's signature whenevercosignis installed, not only withCHRONOS_VERIFY=1(which now requires it);CHRONOS_VERIFY=0skips it, with a warning (engine #434). - A transform is its type's owner's. With roles on,
CREATE TRANSFORMandDROP TRANSFORMby a role that doesn't own the type are refused (42501must be owner of type ...), as in Postgres; any role could drop another role's type's transform (engine #431). - A subquery reading the outer query's aggregate gets its own answers. Its answers were cached by where its plan sat in memory; a function body planned per call could reuse that place for another such subquery with the same values and get the first one's rows. They are cached by the query's hash, as every other subquery's are (engine #431).
- A STRICT SQL function in a CHECK or a generated column keeps its domain parameter's constraints. A NULL argument skipped the call, and with it the domain's NOT NULL or CHECK:
CHECK (f(x))withf(nn)STRICT andnnNOT NULL let a NULL in. The argument is made the domain's first, as Postgres does (engine #431). - SQL: DDL a function, trigger or DO block runs is undone with its block, as in Postgres: a DO block that fails, a statement that fails after a function made a table, and an EXCEPTION handler's block take back the tables, columns, constraints and functions they made or dropped, as they already took back their rows and index builds. Each key the body's DDL writes is noted with its old value and put back on rollback (CHRONOS-294, engine #283).
- SQL: the empty text as a primary key, beside keys starting with chr(1): a range read on the key (
pk > '',pk <= chr(1)) found too few rows, as the empty text's stored key sorts after theirs; such a range now reads past it and rechecks. And the row is named as it is shown,t/, by the key-value API (HTTPget,put,deleteandbatchtake an emptyid) and a merge'sRESOLVE ('t/' = ours)(CHRONOS-294, engine #286). The stored form is unchanged: no migration. - SQL:
DROP OPERATOR CLASS ... CASCADEof a class a unique index uses, with a foreign key referencing that index, failed with 2BP01; the key is dropped first now, asDROP ACCESS METHOD ... CASCADEdrops it (CHRONOS-294, TODOS from engine #265). - An index of a made access method that names no operator class now depends on the default class it took:
DROP OPERATOR CLASSrefuses while it exists, and CASCADE drops it, instead of leaving an index whose definition no longer replays. Indexes made before this keep no class and aren't found. DROP FUNCTION ... CASCADEof a hash operator class's support function is refused when a temporary table hashes its partition key with the class, as it already was for the world's tables; before, the class went and the table's new rows routed by the built-in hash while its old rows stayed where the function had put them.- A schema-qualified call of a set-returning function's row,
s.name(f(x)), is a call again, as in Postgres; it was read as the fieldnameoff(x)'s rows, so a missing function returned a column instead of an error. - Attribute notation,
p.fforf(p), findsfalong the search_path, asf(p.*)does; it took public'sfeven when an earlier schema on the path had one. GRANT ... ON FUNCTION(andALTER FUNCTION ... OWNER) of a built-in finds it when the search_path has a made function of the same name, asapp.lower(integer)besidelower(text); it said the function didn't exist.DIFF ... AS SQLwrites a UNIQUE constraint'sDEFERRABLEandINITIALLY DEFERRED; replaying the export made a constraint checked per statement.- Postgres's regression suite measured again (2026-11-25, 0.6.2): 89.00% of expected lines, 67 of 219 files exact.
tools/regress_split.pysorts every difference into refused, wrong, plan, lenient and message (docs/regress/2026-11-25.md).tests/regress_ratchet.shallows a file 1 point (none at 100%) instead of 2, and fails a file with more wrong-answer places thantests/regress_wrong.tsv. - Security hardening: a cast is its source or target type's owner's to make and drop (42501 otherwise), as in Postgres. Reading from another Postgres or MySQL:
channel_binding=requiretakes a login only once the server has proved it knows the password; a SCRAM iteration count outside 4096 to 10 million is refused; a malformed URL's error names the part, never its text. Login failures from IPv6 are counted per /64. A tenant condition sent to an attached Postgres is an escape string, read the same whateverstandard_conforming_stringsis. The Studio's Postgres import refuses control characters in host, user and database. - Remotes: a write right after the remote comes back isn't refused. In
wal_shipping = sync, the upload that let a waiting commit through cleared the "object storage unreachable" state a moment later, under another lock, so a write in that gap was refused (58030) as if the remote were still down; a busy machine widened the gap (remote::sync_shipping_pauses_writes_while_the_remote_is_downfailed under load on Linux). The failure is now cleared in the same step that records the upload (CHRONOS-346). - Security: operators are their owners'. Any role could make an operator in a schema it had no CREATE on, or drop or change another role's; and a role's
=(or<, ...) on built-in types replaced the built-in comparison for every role and every query, soCREATE OPERATOR = (leftarg = int, rightarg = int, function = always_true)made everywhere id = 5true. Making one now needs CREATE on its schema and EXECUTE on its function; dropping it, its owner or its schema's owner; changing it, its owner. As in Postgres, pg_catalog's operators come first: a bare=between built-in types stays the built-in, and a user's is called where its schema is named (1 OPERATOR(public.=) 2) or its operand types are its own (CHRONOS-357). - Security: a table read AS OF a moment is checked as it was then.
FROM t AS OF '-1 second'was checked against the catalog now only, so any role read a table dropped withinhistory_retention, and a role that made a table again under the old name read the old one's rows as their new owner. Now a table that isn't the table of its name now (dropped, or made again by another owner) needs SELECT on it as it was then, or the read is refused (42501), asUSE main@...already refuses it (CHRONOS-358). - Security: request and connection rates. HTTP requests are limited per token (100 a second, or per client address for a request with no token;
CHRONOS_RATE_LIMIT, 0 for none): past it, 429 withRetry-After. New connections are limited per client address, both ports together (20 a second,CHRONOS_CONN_RATE): past it, 503 or Postgres's 53300. Clients on loopback aren't limited. Four connections pastCHRONOS_MAX_CONNECTIONSare kept for the admin token over HTTP, so a flood from many addresses can't lock the owner out./v1/healthand/metricsrefuse a body over 64 KB from its header (413) instead of reading up to 32 MB before any token (CHRONOS-305). - Postgres: several statements in one simple Query are one transaction. Behaviour change. As in Postgres,
insert ...; insert ...; insert ...sent in one Query (psql-c, a driver'sbatch_execute, a migration tool) now runs as one implicit transaction: a failure in the third undoes the first two, and the rest don't run. Before, each statement committed as it ran, so a failure left the earlier ones applied with no error about them. One statement alone, a string with its ownBEGIN/COMMIT, one with a world's statements (CREATE WORLD x; USE WORLD x; ...) or aCOPY, and statements sent inside a block the client began run as before (CHRONOS-304). - Docs: upgrading and going back. docs/operations.md has a section on it: which releases write which data format (7 up to 0.5.5, 8 from 0.6.0), backing up before an upgrade, restoring that backup on the old release (there is no in-place downgrade; an older release refuses a newer folder without changing it), and keeping writes made since. RELEASING.md says how a bad release is yanked. A test checks that a copy from before the upgrade opens and that a newer format is refused with the message the docs quote (CHRONOS-298).
- Worlds held for review are durable. A world proposed for merge or waiting for a reviewer is now made a durable world first, so a crash while it waits loses none of its writes and doesn't flag it. New setting
ALTER SYSTEM SET durable_worlds = held | all | off(SHOW durable_worlds):held, the default, does this;allmakes every new world durable when it's made, at an fsync per write (grouped);offkeeps the old behaviour, where only worlds made durable by hand were (CHRONOS-262). - A GIN index on
jsonbsays it isn't used.CREATE INDEX ... USING ginon ajsonbcolumn or expression still succeeds (dumps restore, ORM migrations run) but now sends a NOTICE that containment queries (@>,?,?|,?&) scan the table, and suggests indexing an expression such as((c ->> 'k')). GIN indexes on hstore, ltree, tsvector and pg_trgm, which are used, say nothing (CHRONOS-330). - Objects that do nothing here say so.
CREATE PUBLICATION,ALTER PUBLICATION ... ADD/SET,CREATE SUBSCRIPTION,CREATE FOREIGN TABLE,CREATE TABLESPACEandALTER TABLE ... SET TABLESPACE(to a tablespace other thanpg_default/pg_global) still succeed with their usual tag, and now send a WARNING (01000): Chronos has no logical replication, reaches no other server, and keeps no files in a tablespace. New session settingchronos.catalog_only_objects = warn | error(defaultwarn);errorrefuses them with 0A000 before anything is made (CHRONOS-324). - Fuzz targets.
fuzz/(cargo-fuzz, nightly, its own workspace) has two coverage-guided targets:sql_parse, any bytes into the SQL parser, andsql_run, parsed SQL run against a small fresh database, each with a seed corpus. RELEASING.md runs each for 10 minutes before a tag; CONTRIBUTING.md says how. A wire-protocol target waits on the framing moving into the library (CHRONOS-232). - Soak test and Studio smoke test.
tests/soak.rs(its own test binary,#[ignore]d): mixed forks, writes, merges, undone merges, checkpoints and restarts forCHRONOS_SOAK_SECS, every world checked against a model, thenVERIFY DATABASE, memory and open files bounded; run before a release (RELEASING.md).tests/studio_api.rsnow calls every read the Studio makes on load and checks each answer's shape. An upgrade test from each older data format still waits on fixtures made with those releases (CHRONOS-332). - Login backoff counts logins as they begin, and per role. Before, 20 connections opened at once with wrong passwords each got a try before any failure was counted; now a login counts from its start, and past the free tries the others wait their turn (up to 10 s), so no more than the free tries reach the check. Failures are also counted per role or agent name (Postgres port, Studio sign-in), so many addresses guessing one password share its count. The refusal now says
too many failed logins from this address or for this role(CHRONOS-359). - Studio sign-in lists only the worlds a role may connect to. In
chronos studio --login, a role that isn't a superuser was shown every world (names, owners, sizes) though SQL would not let it connect to them; now the list holds only those it has CONNECT on (CHRONOS-360). - Security leftovers (CHRONOS-361): cancel requests are rate-limited per client address (10 a second, 100 from all together;
CHRONOS_CANCEL_RATE), so the 32-bit cancel secret can't be guessed by flooding;GET /v1/healthgives the exact version only to the server's or the admin token (Gateway sends its admin token for it);CHRONOS_CLOUD_APImay be plainhttp://only for localhost, since the API key would go in clear;chronos import postgres://user:password@...warns thatpsshows the password and points toPGPASSWORD;install.shtakes the old GitHub-workflow signature only for tags up to v0.4.1, and checks the installedchronos --versionis the release asked for. - Audit items confirmed (CHRONOS-264), with tests:
UNDO MERGErefuses a put-back that would break a unique key main took since (23505) and rebuilds the index rows it puts back; the merge ledger names the policy, its hash andapprovedwith the hold's reasons for a reviewed merge, andREVIEW WORLD ... APPROVEof a world written to since its hold is refused (40001). - Masking at import (CHRONOS-251):
chronos import ... --mask email=hash,phone=partial(a CSV import or a whole Postgres database,table.colthere) replaces those columns' values before they are stored, so the folder never holds them. Modes areSET MASKED's own (hash, format, partial, null), keyed byCHRONOS_MASK_KEYor else the database's mask key, so hashed columns still join, across tables and with columns masked on read. A rule naming a column the import doesn't have, or a hash into a non-text column, is refused before anything is copied.chronos attachdoesn't mask at import (merges would write masks back over real data):docs/designs/masking-attached.md. - A refused merge retried in a loop is bounded (CHRONOS-246): it counts as one of its agent's writes toward
writes_per_minute(past it, 53400, neither counted nor logged), and a world logs at most 1,000 refusals of each kind;SHOW MERGE OUTCOMES(and themerge_outcomesop) gainrefusals_capped, the worlds whose counts stopped there. - The security audit is kept on disk, with logins (CHRONOS-237): a database in a folder appends it to
audit/YYYY-MM.jsonl(sealed when encrypted), so it survives restarts and goes into backups. It now records every Postgres login, let in or refused, and over HTTP wrong tokens and the admin token's use, each with the client's address;SHOW SECURITY AUDITgainsSINCEand theaddrandoutcomecolumns. Its ownaudit_retention(default 365 days, apart fromhistory_retention) only the database's own user may shorten.chronos audit export <folder> [--since t]prints it as JSON lines. - Shared sequence counters, pinned and said plainly (CHRONOS-312): a test pins that worlds share the database's counters through fork, discard, merge and
setval; the worlds docs now say a discarded world's numbers stay used (use UUIDs for numbering without gaps). Behaviour unchanged. ADD COLUMNwith a per-row default fills the rows there (CHRONOS-314, part A):DEFAULT gen_random_uuid(),nextval('s'),random(),clock_timestamp()or a function of your own on a table with rows was refused (0A000); each row now gets its own value, as in Postgres, a big table's in parts (Redo::Fill).ADD COLUMN ... serialthere is still refused, now saying to usebigint DEFAULT nextval(...).RENAME TOstill rewrites every row (part B).SET LOCAL chronos.world = 'w', as a transaction's first statement, runs that transaction in world w and puts the connection back in its own world at COMMIT or ROLLBACK, so a pooler in transaction mode (PgBouncer, Supavisor, RDS Proxy) never hands the next client someone else's world.SET chronos.worldisSWITCH WORLD;DISCARD ALLputs the login world back. See operations' "Behind a connection pooler". (CHRONOS-310)chronos importbrings Postgres's roles (and memberships), tables' owners, row-level security with its policies, and grants (tables, views, sequences, columns, schemas, functions, default privileges). Passwords only with--with-passwords;--no-roles,--no-privileges,--no-policiesleave each out, as in pg_dump. Anything refused is listed with its statement, and a table protected there but open here prints a WARNING and fails the import unless--allow-open-tables. (CHRONOS-303)- A world statement refused inside a transaction (25001) has a HINT naming each driver's autocommit setting (psycopg, JDBC, SQLAlchemy) and
SET LOCAL chronos.world. Tests pin that arrays compare element by element and thatROLLBACK TO SAVEPOINTtakes back temporary tables; the compatibility page no longer says otherwise, and says the Docker image has tzdata. (CHRONOS-290, in part: enum columns still reach clients typedtext, andANALYZEstill keeps no statistics) chronos verify <folder>checks a closed folder, and--salvage <new folder>copies every row that can still be read of a damaged one into a new folder, world by world, past pages that are missing or fail their hash, and prints the key ranges lost (exit 1 if any). The damaged folder is only read. Operations has a "When a page is corrupt" runbook. (CHRONOS-271, in part: the background scrub isn't built)- A refresh on the timer skips the rows of tables Postgres shows unwritten (CHRONOS-291).
serve --refresh-everyread every attached table whole each time. It now askspg_stat_user_tablesfirst (rows inserted, updated, deleted, live and dead, and the table's file, which a truncate replaces; partitions summed), read before the refresh's snapshot, and leaves the rows of tables whose counts haven't moved since the last refresh unread (unreadin the answer); their columns are still checked. Every table is still read at least hourly, after a restart, while a column waits for values, and withtrack_countsoff. Postgres counts a write about a second after its commit, sochronos refreshand/v1/refresh(asked for, usually right after a change) still read every table. Postgres only; MySQL, MariaDB and MongoDB unchanged. chronos eval: agent tests on copies (CHRONOS-263).chronos <folder> eval <runs.json> [--gold gold.sql] [--jobs N] [--keep] [--json]gives each run its own world forked from main at one moment. A run is a SQL file, or a shell command that gets its world'sDATABASE_URL(Postgres served on a free loopback port, as the database's own user; no sandbox). Up to--jobsruns go at once (4 by default). The report has a row per run: rows changed per table, the rules of its merge policy it breaks, the merge checks it fails, conflicts with main, and with--goldthe rowsDIFF WORLD gold TO runreturns. Nothing is merged, and the worlds are dropped unless--keep. A run that fails (SQL error, non-zero exit) fails the eval. The agent evaluation guide uses the command.chronos rehearse: a migration tried on a copy first (CHRONOS-261).chronos <folder> rehearse <migration.sql> [--checks checks.sql] [--json]forks main and runs the migration there a statement at a time, each timed, stopping at the first that fails. The report has the rows it rewrote per table, the rows left breaking a constraint (first 5), the checks of--checksthat return rows (a check is a query that should return none), and whether it would merge. A NOT NULL that fails says how many rows hold the null. The copy is dropped and main is never written; exit 1 when it fails. See docs/guides/migration-rehearsal.md.- Docs: data deletion, residency and keys (CHRONOS-339). The security guide's new section says what a
DELETEremoves, and when: queries at once; history and the log at the first checkpoint afterhistory_retention; backups only when you delete them. Pages on disk are not scrubbed: a deleted row's bytes stay in a pack file until the cleanup rewrites that pack, with no time limit. It also says how to purge sooner, that the data is wherever you run the server and its bucket, and that the encryption key is yours. A new test checks that a deleted row leavesAS OFonce the window has passed and a checkpoint has run. - Client certificates on the Postgres port (CHRONOS-308).
chronos servetakes--tls-client-ca ca.pem(CHRONOS_TLS_CLIENT_CA) and--tls-client-cert off|optional|require(CHRONOS_TLS_CLIENT_CERT; off by default, a CA alone means optional). A certificate signed by that CA whose CN is the user name logs that role or agent in with no password, as Postgres'scertlogin does. Withrequire, a connection without one fails the handshake, and one naming another user is refused (28000). Without a certificate underoptional, logins work as before, channel binding included. The HTTP port verifies the same certificates but still identifies requests by token. Not yet: CRL/OCSP, LDAP, GSSAPI. - Docs: two-phase commit is refused (CHRONOS-331). The Postgres compatibility page now names it beside
SERIALIZABLE.max_prepared_transactionsis 0,PREPARE TRANSACTIONrolls back (55000 inside a transaction), andCOMMIT PREPARED/ROLLBACK PREPAREDfind no such transaction (42704). A test readsmax_prepared_transactionstoo. - Postgres compatibility: four catalog and output differences closed. pg_settings no longer lists
extension_destdir, a setting only Debian's Postgres packages add (#451).xpathreturns a namespace node as libxml writes it,xmlns:foo="uri", not its URI alone (#454).'x'::bpcharis a bpchar, not text: a view comparing a char(n) column with a literal is written back asc = 'x'::bpchar, as Postgres writes it, where it read(c)::text = 'x'::text(#453). hstore's and ltree's types and functions, and pgvector's and bloom's index handlers, are rows of pg_type and pg_proc once CREATE EXTENSION made their extension, in its schema and its members in pg_depend, as Postgres has them, so pg_dump writes the CREATE EXTENSION and no CREATE TYPE; before, they were in pg_catalog whether it was made or not (#450). A column of hstore or ltree in a world that never made the extension still finds its type, in pg_catalog. The values work either way, as before.