Change log
Ez az oldal a nucleus saját dokumentációjából készül, ezért angol nyelvű.
-
2026-12-04 — merges in place (§M19 R6b, §6.7): a merge names the frozen right-hand range, its keys taken over where they lie once every member applied the freeze; snapshots made only when sent; members a snapshot replaces removed when it is installed.
-
2026-12-04 — Raft ranges on the storage engine (§M19 R6a, §6.7): a node’s ranges share its store (
nucleus_kv::Database), their state beside their keys under00 27 <id>; an entry applied in one transaction; snapshots read from and installed into the store; the log and the store reconciled at start; the store checked after every restart; 5,000 seeds with crashes between the two. -
2026-12-04 — §M19 R5c (§6.7): a new range’s leader at once (eager election, no promise for members that gave none), clients told when a member is removed, snapshots checked on both sides’ futures; splits 7 ms, merges 27 ms, the slowest operation 38 ms under four changes a second.
-
2026-12-04 — ranges as groups (§M19 R5b, §6.7): splits and merges as commands of a range’s log (freeze, then merge carrying the frozen state), refused commands moved, tombstones, snapshots checked against what a node’s lagging ranges will hold; a node’s ranges never overlap (checked); 5,000 seeds with splits and merges under faults.
-
2026-12-04 — multi-raft (§M19 R5a, §6.7):
MultiNode, a node’s groups in one log with one sync a round, their messages one packet a destination, idle groups quiesced; 1,000 quiesced groups cost what one does. -
2026-12-04 — Raft reads and a linearizable KV (§M19 R4, §6.7): ReadIndex by rounds of heartbeats, lease reads on a promise that survives restarts and raised terms, a key-value store with client sessions, and a linearizability checker (WGL, key by key) run over every simulated history.
-
2026-12-04 — Raft membership (§M19 R3, §6.7): joint consensus and learners; a voter replaced (learner, caught up, swapped in) under the simulator’s faults.
-
2026-12-04 — Raft durability (§M19 R2, §6.7):
LogStore, every group of a node in one checksummed append-only log, one write and one sync a round; segments rewritten whole; snapshots and log compaction, a snapshot sent to a member behind; the simulator’s nodes on their own simulated disks, crashing at any operation. -
2026-12-04 — Raft (§M19 R1, §6.7):
nucleus-raft, the protocol as a pure state machine (pre-vote, CheckQuorum, aReadypersisted before its messages go), and a deterministic simulator of nodes — delays, loss, duplication, partitions, pauses, crashes from one seed — checking Raft’s safety properties after every event and convergence once healed. -
2026-12-04 — ranges (§M18, §6.6): the keyspace cut into logical ranges, descriptors as keys, a ranged
Kvwith its router; where a range may end (KeyLayout: units, forced boundaries),ALTER TABLE … SPLIT AT/UNSPLIT,nc_catalog.ranges; sizes estimated from the store’s indexes (approx_bytes) and splits (tables first) and merges by size in the background; load splits — requests counted by each range’s server, sampled while hot, cut intokparts at once by chains-on-chains partitioning;nucleus server --ranges(--range-split,--range-load,--range-check); the router’s cost measured and cut to the noise on one range (a thread’s view of the ranges checked by the store’s epoch, a branch-free search over the ends, nothing shared written per request but a striped counter). -
2026-12-02 — failover fixes (issue #29): a vote given, and standing oneself, count as hearing a primary for a lease, so a member just elected is not replaced at once; a promoted replica takes writes only once its database shows the new epoch (a sibling asking to follow in between was served from a place in the wrong log); a primary that stops taking writes lets go of its commits waiting for replicas (
40003, outcome unknown) instead of keeping them waiting for good. -
2026-12-02 — drivers of a cluster (§M17.5 R5b–R5e): C, C++, Swift, Java, Android, Python and JavaScript settle on the target among several servers and fail over as the Rust client does; a transaction block cut off by the failover has its next statement refused (
08007);08006for a lost connection and08001for one not made in every driver;scripts/cluster-tests.sh. -
2026-12-02 — clients of a cluster (§M17.5 R5a): protocol version 12 (the server’s role in Welcome, the commit token in Ready); the Rust client and
nucleus sqltake several hosts and a target, find the new primary after a failover and keep the token (§9, §10). -
2026-12-02 — a replica follows whichever member serves (§M17.5 R4d): a cluster’s replica turns to the other members when its primary fails or refuses it; a cluster of a primary and two replicas starts without a witness;
--sync-replicaswaits on a replica only once promoted (§9). -
2026-12-02 — automatic failover (§M17.5 R4c):
--cluster,--lease,nucleus witness: a primary writes only under a majority’s lease, a silent primary’s replica is elected (pre-vote, one vote per epoch) and promoted (§9, §10). -
2026-12-02 — failover slots (§M17.5 R4b): a replica keeps its primary’s other slots with its own log held for them, so a promotion needs no seed for them; a replica of another database is refused (§9).
-
2026-12-02 — failover: epochs,
nucleus promote(§M17.5 R4a): a promoted replica is the primary of a new epoch; an older epoch’s primary steps down, a replica past the fork is seeded again (§9, §10). -
2026-12-02 — synchronous replication, commit tokens (§M17.5 R3):
--sync-replicas kmakes a commit visible and answered oncekreplicas have it;nc_last_commit()andnc_wait_commit(token, ms)read one’s own writes on a replica (§9). -
2026-12-02 — read replicas (§M17.5 R2):
nucleus server --replicationserves replicas over protocol version 11, each in a slot that holds its log.--replica-ofmakes a read-only replica, seeded from a snapshot and then following the commits at the primary’s timestamps. It resumes where it was, andnc_catalog.replicationshows both sides (§9, §10). -
2026-12-02 — the log decoded into commits (§M17.5 R1, D25): a reader of the WAL beside the writer, a hold kept through checkpoints and restarts, the decoder of commits (spilled transactions’ intents gathered until their commits), where a replica starts and starts again (§5.4).
-
2026-11-25 — reads by key (the perf phase, steps 1–2): the store’s lock striped, the page table read without a lock, the root read from the thread’s own copy (ten threads’ reads by key 1.95 → 7 M a second); a lookup join’s right side read by its whole primary key with a
get, a secondary index’s range without its plan (exec::KeyLookup), a get’s first version found without a range (BTree::seek_one), and a pipeline with a lookup step cut into morsels of two leaves (KvRead::split_points_fine): 20,000 keys joined to 2,000,000 rows by primary key 46 → 24 ms on one worker, 27.5 → 7 ms on ten, by a secondary index 52 → 38 ms on one, 28 → 13 on ten. -
2026-11-20 — found rows looked up a group at a time (the sweep): where the rows an index method finds lie far apart,
entries_atlooks them upGET_MANYat a time, their descents’ cache misses overlapped. json-index containment (2,000 rows of 200,000): 2,140 → 1,930 µs (PostgreSQL 1,000, issue #10). -
2026-11-20 — text, sparse and JSON index builds on the workers (the sweep): the three builds share
build_segments— batches of 512 to 100,000 rows on the statement’s workers, their segments merged into one in memory before any is written.USING jsonover 200,000 documents 801 → 207 ms (PostgreSQL’s GIN 266); BM25CREATE INDEXscifact 361 → 107 ms (ParadeDB 297), nfcorpus 323 → 90 (210), arguana 273 → 137 (340). -
2026-11-20 — counts over an index’s range (the sweep): the filter’s conditions a secondary index’s key range applies exactly are not checked again, and an index scan wanting no column reads no row. json-index,
(doc->>'score')::int BETWEEN 10 AND 12(600 rows): 762 → 165 µs a count (PostgreSQL’s index-only scan 111). -
2026-11-20 — filtered vector searches (the sweep): a B-tree range searched among is read with its keys left escaped, and the filter’s conditions on an integer primary key are checked on its entries before a distance. SIFT-1M,
ef_search40:a = 7 AND id % 10 = 3462 → 266 µs a search (pgvector 215),a = 7298 → 263 (353),a < 101410 → 990. -
2026-11-20 — vectors loaded from their bytes (the sweep): a driver’s
vectorandsparsevecvalues are checked from their bytes (Type::wire_input), not formatted and parsed again; the Python driver’sloadsends a vector column of float32 numpy arrays as one block a batch. SIFT’s 900,000 vectors 15.9 → 1.46 s (pgvector’sCOPYof a prepared binary file 1.80). -
2026-11-20 — exact sums’ window check inlined (the sweep): an addition’s check that the chunks hold it is inlined, the growing apart:
corr181 → 152 ms, skewness and kurtosis 222 → 189 (issue #8 for the rest). -
2026-11-20 — window functions over ten million rows (the sweep): frames computed where wanted, not kept (560 MB); the input’s rows made with room for the calls’ values; exact sums finished from an
i128; an aggregate of one argument fed without a vector a row. Running sum 3302 → 1967 ms (PostgreSQL 2308),lag2559 → 1961 (2150), moving average 4896 → 4526 (8581). -
2026-11-20 —
DISTINCTover a primary key left out (the sweep):count(DISTINCT id)whereidis a scanned table’s primary key of one column aggregates ascount(id): 806 → 90 ms on ten million rows (PostgreSQL 401), by 1000 groups 1527 → 107. -
2026-11-20 — a load’s committed intents read a leaf at a time (the sweep before F1’s whole run): a row table’s scan over intents not yet vacuumed ranks them in place, a leaf’s entries at a time with their keys left escaped (
Scan::refill_escaped_merged), instead of decoding each version’s key. The statistics suite’s ten million rows as loaded:sum209 → 100 ms,variance203 → 120,corr248 → 163. -
2026-11-20 — the column cache sized by the machine (the sweep before F1’s whole run): decoded columns are cached up to an eighth of the memory the process may use (at least 256 MiB) instead of a fixed 256 MiB, less than a TPC-H SF 1 query’s
lineitemcolumns: a scan through more than the cache, run again, found none of them. TPC-H on column tables, ten workers, geometric mean 0.713× (Q20 69.7 → 31.1 ms, Q6 36.4 → 16.2, Q8 87.3 → 29.7); ClickBench on column tables 0.985×. -
2026-11-20 — late materialization for column scans (the sweep before F1’s whole run): a column table’s scan whose first step is a filter decodes the filter’s columns of a segment run (a dictionary’s codes where the filter tests its entries), tests them, and reads the other columns for the rows kept only — a few a value at a time (
segment::values_at), more from the decoded column by their places — when what it spares is a column of variable length or four fixed. ClickBench Q23 on column tables, ten workers, 108 → 7 ms; TPC-H Q14 and Q15 on column tables 43 → 23 and 46 → 33 ms. -
2026-11-19 — user keys escaped a byte at a time (the sweep before F1’s whole run):
mvcc::escape_ontowrites a key’s bytes, each zero followed byFF, into room for the worst case instead of copying the runs between zeros a call each (a six-integer index key 117 → 54 ns); the TPC-H SF 1 load 31–33 → 29 s. Left: the vacuum after a bulk load (issue #4). -
2026-11-19 — a projection moves the columns it passes on;
any_value(the sweep before F1’s whole run): the row executor’s projection moves a column it passes on as it is out of its input row at its last use instead of cloning it (no text copied a projection: TPC-H Q10 on ten workers 139.5 → 128.1 ms); the aggregateany_value(x)(SQL:2023, PostgreSQL 16). -
2026-11-19 — distinct aggregates over joins grouped twice; columns pruned past an uncorrelated subquery (the sweep before F1’s whole run):
count(DISTINCT x)over a pipeline’s hash joins runs as two vectorized, parallel groupings (vector::distinct_aggregate) instead of a set a group a row at a time; a filter with an uncorrelated subquery no longer makes its scan decode every column. TPC-H Q16 on row tables: ten workers 100.7 → 77.5 ms, one 170.7 → 143.3. -
2026-11-19 — a buffer frame made with the page read into it (issue #2): a frame used the first time was made with an empty page, allocated and zeroed, which the page read then replaced (and freed); after a start every frame a cold scan fills is a first use. Now the frame is made with the page read. TPC-H Q6 cold (the server just started) 226.6 → 187.3 ms.
-
2026-11-19 — a row’s values passed over by their tags’ lengths, decimal comparisons with a constant on 64 bits (issue #2): a scan skipping the columns it does not read passes a fixed-length value or a short text by the length its tag gives (a table), the row’s end checked once; a decimal column held as 64-bit mantissas compared with a constant that fits them goes through the integers’ comparison kernel; the row decoder’s small reads are inlined. TPC-H Q6 on row tables: one worker 573 → 485 ms, ten 101.6 → 89.5.
-
2026-11-19 — a filter’s conjunction narrowed a term at a time (issue #2): each term of a filter’s
ANDis evaluated over the rows no term before it held FALSE for, a row a term heldNULLfor dropped at the end, instead of the three-valuedANDbuilt over all the rows. TPC-H Q6 on row tables, ten workers, 112.0 → 100.4 ms. -
2026-11-19 — decimals stored in 6 or 10 bytes (issue #2, row encoding version 4): a decimal whose mantissa fits 32 or 64 bits is stored as its scale and those bytes (tags 26, 27) instead of a 128-bit mantissa (18 bytes); older rows still read, rewritten when next written. TPC-H Q6 on row tables, ten workers, 126.6 → 111.8 ms; Q1 198.8 → 175.7.
-
2026-11-19 — a scan’s leaves read whole first (issue #1): a B+tree cursor moving on to a leaf in a scan reads a byte of each of its cache lines before its entries (
View::touch), the misses overlapped. Format version 4’s key prefix beside the header had slowed row scans (Q6 1.13×): the hardware prefetcher covered a leaf read entry by entry less well with it there. TPC-H Q6 on one worker 806 → ~711 ms. -
2026-11-18 — §M14.28 L3b, a table’s engine changed online:
ALTER TABLE … SET (engine = …)— the keys copied under a new id while the transaction layer mirrors writes there, then switched at a commit; a column copy’s directory keyed relative to its table (table record version 23). A million rows and their index move in 2.4 s;SET STORAGE column’s drop of a row copy reads on from its last key (a million rows 16.9 → 1.3 s). -
2026-11-18 — §M14.33 done: the suite, TPC-H and ClickBench run again against the native, tuned PostgreSQL (
docs/benchmarks.md): row tables’ geometric means 0.65× (TPC-H) and 0.57× (ClickBench), column tables’ 0.46× and 0.16×, reads by key even (1.02×, the intervals overlapping), every answer the same. -
2026-11-18 — §M14.33 R4, the load’s vacuum: a checkpoint writes its pages sorted, a run of neighbours (up to 1 MiB) a call, not a page a call in the cache’s order; a vacuum’s sweep copies no entry (keys compared escaped, a value read only for an intent or a tombstone’s byte). TPC-H SF 1’s row load with its
VACUUM ANALYZE47.5 → 29.0 s, its column load 27.5 → 22.7 s. -
2026-11-17 — §M14.33 R4, rows decoded in their pages:
Scan::visit/KvChunks::visithand a row table’s batch each live entry where it lies, its columns decoded there, not copied first (a row with a value stored out of line read by chunk; TPC-H Q1, Q9, Q12, Q18 7–8 % faster). -
2026-11-17 — §M14.33 R4, the joins: an index nested loop a pipeline’s step, so what is above it runs on the workers too (
vector::Lookup); a lookup’s own key scan a row at a time; a lookup costed as 55 scan rows (was 40); an uncorrelated subquery run without the enclosing row, on the workers (TPC-H Q11 103 → 37 ms, Q10 382 → 152, Q5 515 → 172, Q7 274 → 158). -
2026-11-17 — §M14.33 R4, a row table’s scan again: a
numericcolumn decoded straight into a vector of mantissas; a row scan’s keys left escaped as the store keeps them (KvChunks::escaped_keys, decoded only for a value stored out of line) and read a B+tree leaf at a time (TPC-H Q6 200 → 156 ms; ClickBench’s row queries 0.87× of before). -
2026-11-17 — §M14.33 R3, ClickBench’s worst row queries: an integer vector cast to an integer type kept as it is when every row fits (Q29 235 → 82 ms); a row table’s filter run on its own columns before the others are decoded, late materialization (Q23 145 → 55 ms);
count(*)a B+tree leaf at a time, a version’s older ones told by the entry before, no key copied (Q0 38 → 24 ms). -
2026-11-17 — §M14.33 R3a, a row table’s scan:
VACUUM ANALYZEanalyzes (PostgreSQL’s forms, the tables named); a scan that reads no column (count(*)) neither decodes keys nor reads values (KvChunks::count_only); the benchmarks give nucleus PostgreSQL’sshared_buffersas its page cache and bothVACUUM ANALYZEafter a load. -
2026-11-17 — §M14.33 R2c, the session’s floor: the catalog cache looked up by the borrowed name, a transaction that wrote nothing not asked under the engine’s lock, a statement normalized once (and a repeated text not again); a literal read by key 9.2 → about 8.5 µs.
-
2026-11-17 — §M14.33 R2b, a Unix socket:
nucleus server --socket <path>, every driver’s host a path (Rust andnucleus sql, Python, JavaScript, Java, C, C++, Swift); the benchmarks’ nucleus reached by it, aspsqlreaches PostgreSQL. -
2026-11-17 — §M14.33 R2a, a read by key’s plan kept by its shape: its key’s literals as parameters, one plan for every key (
shape::by_key); in the process 23.6 → 9.2 µs. -
2026-11-17 — §M14.33 R1, measuring it fairly:
nucleus sql’s\timingstops when the results are in, before they are printed, aspsql’s does; its output is buffered when it is not a terminal.bench/tpch.pyandbench/clickbench.pykeep each system’s plan of each query (EXPLAIN, estimates stripped, hashed) in the results, andmethod.py reproducesays where a time moved with its plan. -
2026-11-17 — §M14.31 P1c–P1d, every number by the method: every section of
docs/benchmarks.mdfrombench/all.sh’s results files; method 2 — a difference within 10 % not claimed, rounds started when the machine’s other work is under 2.5 cores; a second run reproduces. -
2026-11-18 — §M14.28 L5, the verdict: YCSB A, B and E (
crates/sql/tests/ycsb.rs),wamp.pyphases 6 and 7 (updates, deletes), space amplification and the restart’s time,--engine=lsmand--values=random,bench/run.py --engines;bench/all.shstepswamp-lsmandycsb. An LSM table recommended for random-key writes into tables larger than the cache; the B+tree stays the default. -
2026-11-18 — §M14.28 L5, LSM tables’ scans in parallel:
Engine::split_keys; the merge’s buffers reused; one source read a batch at a time (Entries::leaf_entries).count(*)of a million rows 98 → 7.1 ms (the B+tree’s 6.3). -
2026-11-18 —
left()andright(): the functions, as in PostgreSQL (the words reserved for joins taken as function names before a parenthesis; until now a syntax error). -
2026-11-18 — §M14.28 L5, versions dropped by commits from the LSM memtable:
Engine::apply_filtered; YCSB A on an LSM table 5 726 → 10 530 operations a second, a read’s p99 531 → 25 µs. -
2026-11-18 — §M14.15, lateral table functions on the workers:
TableFunction::parallel_safe;JSON_TABLEover 50,000 performances (1.79 million rows) 0.824 → 0.298 s (PostgreSQL 18’s 0.321). -
2026-11-18 — §M14.15, JSON Schema checks faster: the path kept only for problems told, a value decoded only for keywords that read it, the check split by kind of value;
json_matches_schema378 → 275 ns a tool call (jsonschema0.61: 148). -
2026-11-18 — a lookup’s rows fetched a group at a time (issue #1): a secondary index’s entries fetch their rows by primary key up to eight together (the first alone: an existence check wants one) (
KvTxn::get_many→Transaction::get_many→BTree::seek_group: the descents a level at a time, each level’s pages read for the whole group before any is searched, their cache misses overlapped); TPC-H Q20 on one worker 218 → 180 ms, on ten 58.0 → 53.9 (PostgreSQL 59.7). -
2026-11-18 — B+tree nodes with key heads (issue #1, format version 4): each slot holds its key’s first four bytes past the node’s prefix, internal nodes store their keys’ shared prefix once, beside the header; a search compares integers and reads a cell only on a tie. A point lookup in a 2-million-row tree in memory 1045 → ~800 ns; TPC-H Q20 ~1–2 % (its cold leaves’ misses stay). Older files are read, and marked version 4 (5 encrypted) by their next commit.
-
2026-11-18 — a key’s versions looked up without allocating (issue #1): where no intent is in sight,
engine::versions_atbuilds a look’s bounds in buffers its thread keeps and reads a version’s timestamp from its key’s end (nine allocations a fetch were three escapes and copies); TPC-H Q20 on one worker 234.5 → 220 ms. -
2026-11-18 — scalar aggregate subqueries unnested (issue #1): a comparison with an aggregate of one table’s rows matching the row’s own key becomes a join and a grouping (
unnest::grouped); TPC-H Q20 86.5 → 64.3 ms (PostgreSQL 59.7, ≈ by the method). -
2026-11-18 — a row table’s scan, cheaper rows (issue #2): a date compared with a timestamp in a kernel, decimals of 64-bit mantissas read from a row without a check each, a decimal counted as two columns for late materialization, a scan’s keys compared from the end; TPC-H Q6 on row tables 159 → 138 ms (PostgreSQL 93.0; one worker 921 → ~712).
-
2026-11-18 — semi joins on a unique side look the outer table up (issue #1):
optimizer::lookups; TPC-H Q20 on row tables ~10 % faster (one worker 285 → 258 ms). -
2026-11-18 — sealed engine files, keys derived once (issue #3): one nonce a file, its message keys derived once, 1 KiB chunks (format version 2; version 1 read); a lookup on an encrypted LSM table 5.3 → 4.0 µs (in the clear 2.4). Test fixes for CI: the
lsm_wampruns in directories of their own,encrypted.rs‘s path check with Windows’ separators. -
2026-11-18 — short range scans:
Access::serves(a filter the key range applies keeps aLIMITed scan on one thread) and KV chunks growing from 64 entries (nucleus_kv::FIRST_CHUNK); YCSB E’s scans on a B+tree 2.5 ms → ~25 µs. -
2026-11-18 — §M14.28 L4e, the engines’ files sealed: an encrypted database’s runs, manifests, map files and routes sealed in 4 KiB chunks (
nucleus_storage::sealed);engine = lsmno longer refused there; a new key andencryptseal them too. -
2026-11-18 — §M14.28 L4d, versions dropped by LSM merges: the transaction layer’s commit filter (
Collect) applied to compactions (Store::set_compaction_filter,LeafFilter::drops_aboveabove the last level). -
2026-11-18 — §M14.28 L4c, the LSM tree’s block cache: blocks decoded once and searched in place, kept in a CLOCK cache for the process (
StoreOptions::lsm_cache_bytes); a lookup 3.3 → 2.5 µs. -
2026-11-18 — §M14.28 L4b, bulk loads into the LSM tree: the memtable’s ascending tail, spilled as a run past 64 MiB by the loader (
Engine::spill); a run’s writes gathered to 1 MiB; LZ4’s speed-ups inlz::compress; a flush’s run name free when two checkpoints share an LSN. A three-million-row index build 1174 → 527 MB at peak. -
2026-11-18 — §M14.28 L4a, the LSM tree’s work off the writers: a checkpoint’s engine saves run in
Checkpoint::finish, not under every writer’s lock (Engine::saver); compaction is a background job (Engine::job/install,Store::compact, thenucleus-compactthread) withinStoreOptions::compaction_bytes_per_sec. The slowest commit under steady random writes 1379 → 65 ms. -
2026-11-17 — §M14.28 L2–L3a, the LSM engine: memtables, runs with Bloom filters, range tombstones, lazy leveling;
CREATE TABLE … WITH (engine = lsm)anddefault_table_engine. -
2026-11-17 — §M14.15, a table’s bound writer kept across statements in the catalog cache (a
CHECKed insert +6.0 → +1.3–1.6 µs). -
2026-11-16 — §M14.31 P1a–P1b, the measuring method:
bench/method.py(medians, bootstrap intervals, spread, runs again, interleaving, the environment, results files,show,reproduce,run),bench/pg.py(PostgreSQL native and tuned);bench/run.py,bench/tpch.pyandbench/clickbench.pyon it — sessions kept open, cold and warm, answers checked.nucleus sql:\echo TEXT,\timing on|off;nucleus server --help(andinit,kv,restore,keys,branch) prints the usage instead of opening a database named--help. -
2026-11-16 — §M14.30 K5b, encrypted columns and subject keys in every driver: Python (
nucleus.columns), JavaScript (columns.ts), Java (ColumnKey), C (nc_column_key_init,nc_encrypt,nc_decrypt,nc_blind_index), C++ and Swift (over C), each with XChaCha20-Poly1305 of its own and the shared vectors (NUCLEUS_VECTORSinscripts/driver-tests.sh); protocol version 8 andpresent_subject_key/hold_subject_keyin each. -
2026-11-16 — §M14.30 K5a, client-side encrypted columns (Rust):
nucleus_crypto::aead::{hchacha20, xseal, xopen}(XChaCha20-Poly1305);nucleus_client::columns(ColumnKey,Plain), format 1 and its test vectors (drivers/encrypted-columns.txt). -
2026-11-16 — fix, a JSON path’s time: evaluating a path looks at the statement’s deadline every 4,096 items (
budget::check_deadline,57014) —$[0,0,…][0,0,…]…makes exponentially many (the fuzz job’sjsontimeout); the fuzz target runs paths under a second’s deadline, and the job’s annotation carries the failing input (base64). The PKCS#11 module’s tests build whereCK_ULONGis 32 bits. -
2026-11-16 — §M14.30 K4c, sealed memory stores:
CREATE MEMORY STORE … WITH (sealed);MemorySpec::analyzer(table record version 21);bm25_stats(aggregate),bm25;recallexact over a store without its text index; a bareWITHoption istrue, andtrue/falseare option values. -
2026-11-16 — fix, B+tree merge: two leaves merged after removals and too large together are cut as a batch cuts leaves (
pack_cells, by size as stored), not in two even halves — a half of leaves whose keys had shared long prefixes could overflow its page (CI,retype.rsunder concurrent writes). The PKCS#11 module builds whereCK_ULONGis 32 bits (Windows, i686); the fuzz job’s annotation keeps a timeout’s stack. -
2026-11-16 — §M14.30 K4b, keys users hold:
SubjectKeys::hold,held,held_of(the key file’shline),subject_keys::user_key,wrap,unwrap;Session::hold_subject_key,present_subject_key;sealed::Held(Refused,Absent,Who), the subject columns sealed in a sealed row’s header; protocol version 8’skmessage, RustClient::hold_subject_key,present_subject_key. -
2026-11-16 — §M14.30 K4a, sealed rows: the table storage
sealed(crates/sql/src/sealed.rs, §8.40): rows sealed under their subjects’ keys,SET STORAGE sealed | rowonline (copy statesSealing,Unsealing), the index rule (sealed::check_table),Sample::count,subject_keys::changed/epoch; index lookups pass over rows whose key is destroyed; the integrity check counts them as no fault. -
2026-11-16 — §M14.30 K3f, a new data key online:
ROTATE KEY data,nucleus keys <dir> rotate data; the page cipher’s key generation, parity bit and previous key (PageCipher::with_previous); the header’s new-key fields;Pager::rekey,reseal_step,recover_reseal(thedata.resealjournal);Store::rekey,reseal;Wal::set_cipher,sync_dir;Kv::rekey,rekey_state,reseal_background,Options::previous_encryption_key; the key custody’srotate,rotating,retire;nucleus_server::resealin the maintenance thread. Fixed on the way: the erased-bytes search used the key the database was opened with, not the file’s as it is. -
2026-11-16 — §M14.30 K3b–K3e, the root key in Vault Transit, Google Cloud KMS, Azure Key Vault and a PKCS#11 token:
modules/vault-transit,modules/gcp-kms,modules/azure-kv,modules/pkcs11(--root-kms vault-transit:…,gcp-kms:…,azure-kv:…,pkcs11:…);nucleus-http’strust_pemand plain HTTP to link-local addresses;scripts/kms-test.shagainst Vault in dev mode and SoftHSM2 as well, CI’s kms job running the PKCS#11 module’s tests against SoftHSM2. -
2026-11-16 — §M14.30 K3a, the root key in AWS KMS:
modules/aws(Signature Version 4, credentials, region and endpoints shared by the AWS modules;modules/s3uses it),modules/aws-kms(--root-kms aws-kms:<key>,rotate-root --to-root-kms;EncryptandDecryptunder the purpose’s encryption context), the edition’sa_root_key_in_kms,scripts/kms-test.shagainst moto in CI. Fixed: a retry after a conflict began before the commit it lost to while that commit waited for its log, and lost again until the ten attempts ran out (40001from aREMEMBERracing the embedding worker on a slow disk) —back_offnow waits for the commits past their conflict check (Engine::settle);/health/readyanswered 503 for a moment after the server said it was listening;scripts/detach-test.shtooknucleus-aws-kmsfornucleus-aws. -
2026-11-15 — §M14.18 O4, restore tests:
backup::restore_test(the last backup restored into a scratch database,check::checkand the audit chain), its record in the backup,nucleus server --restore-test-every,nucleus restore --test, thenucleus_restore_test*metrics, the alertsNucleusRestoreTestFailingandNucleusRestoreTestOverdue(§8.30, §8.39). -
2026-11-15 — §M14.18 O3c, backups compressed, encrypted, kept and scheduled: parts in LZ4’s block format; with a backup key (
--backup-key,NUCLEUS_BACKUP_KEY_FILE) sealed by ChaCha20-Poly1305 and the manifest authenticated by HMAC;BACKUP … KEEP n(backup::prune),nucleus server --backup-to … --backup-every …(nucleus_server::backups); thenucleus_backup_*metrics, the alertsNucleusBackupOverdueandNucleusBackupFailing, a dashboard panel;FileSystem::remove_dir(§8.30, §8.39). -
2026-11-15 — §M14.18 O3b, backups in object storage:
backup::Target(a repository’s files; a directory built in,register_targetfor a module’s URL scheme),modules/s3(s3://bucket/prefix, Signature Version 4, the AWS SDKs’ variables);scripts/s3-test.shagainst rclone’s S3 server in CI (§8.30). -
2026-11-15 — §M14.18 O3a, incremental backups:
BACKUP [FULL] TO 'repo'into a repository (000001-full,000002-incr, …), what changed found by comparing the kept branch’s tree with a new one’s (BTree::diff_ranges,Kv::changed_since), deletes in the backup (sealed for subjects’ rows), manifestnucleus backup 2;nucleus restore --at <commit|backup|time>restores a chain;FORGETdrops the kept branches (§8.30). -
2026-11-15 — §M14.18 O2b, traces: a span per statement over OTLP (
nucleus_platform::trace, theotlpmodule’s/v1/traces), the client’s trace bySET traceparentor a sqlcommenter comment, the SDKs’ samplers (§8.38). -
2026-11-15 — §M14.18 O2, alerts:
monitoring/— alert rules and their promtool tests, a Grafana dashboard,test.shwith a real Prometheus and OpenTelemetry Collector (CI’s monitoring);nucleus_oldest_transaction_seconds; the runbook (§8.39). -
2026-11-15 — §M14.18 O1, metrics: the registry and the
Exporterinterface (nucleus_platform::metrics), the layers’ instruments,nc_catalog.metrics,nucleus status, the modulesprometheus(--metrics:/metrics,/health/live,/health/ready) andotlp(--otlp) (§8.38). -
2026-11-15 — §M14.16 M6, code from SQL files:
DESCRIBE <statement>(§8.5), the binder’s knowledge of what is neverNULL;nucleus codegen … --queries(§8.37); the sample projectexamples/migrations, run in CI. -
2026-11-15 — licence: the database under AGPL-3.0-only, the drivers, the Rust client (
crates/client,wire,crypto) and the examples under MIT; COPYRIGHT (what is under which, third-party notices, the original-author term), AUTHORS, CONTRIBUTING.md (the terms of contributions);nucleus --versionshows the notice. -
2026-11-14 — §M14.16 M5, code from the schema:
nucleus codegen ts|rust|python|java(§8.37). -
2026-11-14 — §M14.16 M4, dry runs and diffs:
nucleus migrate up | down --dry-runon a branch dropped after;nucleus migrate diff [--new name],nucleus_sql::schema_diff(§8.36). -
2026-11-14 — §M14.16 M1–M3, the schema as SQL, migrations, the
ALTERthey need:nc_catalog.definitionsandnucleus dump --schema(§8.33);nucleus migrate,RECORD/FORGET MIGRATION,nc_catalog.migrations(§8.34);ALTER TABLE … RENAME TO,RENAME COLUMN,RENAME CONSTRAINT,DROP COLUMN [CASCADE],ALTER COLUMN … SET / DROP DEFAULT,SET / DROP NOT NULL,ALTER INDEX … RENAME TO(§8.35), each keeping what names the table or column. -
2026-11-14 — Fix: a server whose stderr went away stopped. Its log lines were
eprintln!, which panics on a closed pipe: a server started by a program that read its first line and closed the rest died at the next line (connect: …, since E2 — CI’sncsql_local_and_over_the_networkon Linux and Windows). The server process’s lines now go throughnucleus_platform::log!(re-exported asnucleus_server::log!for front-end modules), which drops a line it cannot write. The storage’s branch test on the real file system usedstd::env::temp_dirandstd::process::id, which panic on WASI: now the platform’s. -
2026-11-14 — §M14.17, easy start:
.deb,.rpm, a container image (distroless static),scripts/install.sh/install.ps1(checkingSHA256SUMS),manifests.sh(Homebrew, winget), each installed in CI;nucleus sql :memory:/kv :memory:(Database::open_in_memory,Options::in_memory);nucleus initmaking a password;NUCLEUS_PASSWORD; the web console (modules/console,--console); the playground (playground/) and the tutorial (docs/tutorial.sql); the JavaScript driver’squeryText; the embedded editions’historyoption. -
2026-11-14 — §M14.13, branches:
Store::create_branch,drop_branch,reset_branch, branches of a past snapshot (Kv::create_branch_at);CREATE / DROP BRANCH,ALTER BRANCH … RESET,… AS OF,nc_catalog.branches; a client names a branch as its database (every protocol,nucleus branch);Database::pages; measured incrates/kv/examples/branches.rs. -
2026-11-14 — §M14.15 J4b, the containment index:
CREATE INDEX … USING json (doc)for@>,?,?|,?&— the text index’s storage, terms a leaf’s path and value hashed and a key path’s; lossy, soIndexMethod::exactkeeps the condition in the filter.slt/70_json_index.slt,bench/json/index.py. -
2026-11-14 — §M14.15 J4a, expression indexes:
CREATE [UNIQUE] INDEX … ((expr), lower(c), …)for every type — immutable, kept on every write, matched structurally by the optimizer (Stats::key_parts,optimizer::choose_access), bound again onALTER COLUMN … TYPE;catalog::IndexExpr, table record version 19.slt/69_expression_indexes.slt. -
2026-11-14 — §M14.15 J3c,
JSON_TABLE: inFROM, desugared into a lateral subquery over__json_table_rows(a table function of the row path’s items and positions) whose columns areJSON_VALUE,JSON_QUERYandJSON_EXISTScalls;NESTED PATHa lateral left join, siblings unioned.slt/68_json_table.slt, 67 records as PostgreSQL 18 gives them. -
2026-11-14 — §M14.15 J3b, SQL/JSON’s functions:
JSON_EXISTS,JSON_VALUE,JSON_QUERY(PASSING, RETURNING, wrappers, quotes, ON EMPTY / ON ERROR),IS JSON,JSON_OBJECT,JSON_ARRAY(of values or a query),JSON_OBJECTAGG,JSON_ARRAYAGG,JSON,JSON_SCALAR,JSON_SERIALIZE: the parser desugars them into calls ofjson::sqljson‘s functions; aRETURNINGtype travels as a typedNULLand the call is specialized to it when bound (ScalarFunction::rewrite), converting with errorsON ERRORhandles.slt/67_json_sql.slt, 207 records as PostgreSQL 18 gives them. Error code22030. Fixes: J3a’s registration leaked its function names (String::leak), which the fuzzers’ leak check caught; a path of 900 signs overflowed the parser’s stack (thejsonfuzz target) — a path’s tree nests at most 128 levels now (54001), chains of operators counted. -
2026-11-14 — §M14.15 J3a, SQL/JSON paths: PostgreSQL’s
jsonpath(a type of its own, kept as its normalized text; oid 4072 in pg-compat), the language with lax and strict modes, filters, predicates, arithmetic, item methods and datetimes, evaluated as PostgreSQL’s executor evaluates it;json_path_exists,_match,_query_array,_query_firstandjson_path_queryinFROM(withjsonb_names and_tzforms),@?and@@; 221 records checked against PostgreSQL 18 (slt/66_json_path.slt). New SQLSTATEs: the SQL/JSON family (22031–2203G). Thejsonfuzz target reads paths; the law kit generatesjsonpathvalues. -
2026-11-14 — §M14.15 J2, JSON’s operators and functions: PostgreSQL’s
jsonboperators (->,->>,#>,#>>,@>,<@,?,?|,?&,||,-,#-), functions underjson_andjsonb_names,json_each/json_array_elements/json_object_keysinFROM,json_aggandjson_object_agg; 108 records checked against PostgreSQL 18 (slt/65_json.slt,scripts/slt-pg.py). Keys now sort shorter first, asjsonb’s;json_prettyprints empty containers asjsonb_pretty. The binder types an untyped right operand by the operator’s forms (Registry::operand_for), and a type’s arithmetic may take a right side of another type (Arithmetic::other_operand); a table function may name its single column. -
2026-11-14 — Fix: a deleted key back over a large commit’s intent. A commit’s leaf filter dropped a key’s newest tombstone at or below the watermark as hiding nothing, though a large transaction’s committed intent of the key, not yet a version, sorted before it: the intent showed again. Seen as a table dropped after a bulk
CREATE TABLE ASback (empty) once later commits rewrote its catalog leaf; now such a tombstone stays while intents are pending (txntestsa_delete_over_an_unmade_intent_stays,collect_keeps_a_tombstone_over_an_unmade_intent). -
2026-11-14 — §M14.15 J1, the
jsontype: one type (jsonbanother name), strict RFC 8259 input, a canonical binary form read in place (keys sorted and found by binary search,a[i]at once, numbers exact as their value), PostgreSQL’s output and order, a key encoding (a primary key, an index, range scans), casts to the scalar types (§8.31);Type::wire_output/wire_input, so it travels as its text; every driver’s own values (RustValue::Json, Pythondict/nucleus.Json, JavaScript objects /Json, JavaJson, CNC_JSON/nc_json, C++Json, Swift.json); pg-compat’sjsonb(3802) andjson(114), text and binary; error code22P05; thejsonfuzz target and the law kit’s generator;bench/json. -
2026-11-14 — §M14.24 R7, examples and the guide:
docs/memory.md(a knowledge base with citations, a memory per user, read records, erasure, backups — SQL, Python, JavaScript, MCP);examples/python/memory.pyandexamples/js/memory.ts, run byscripts/driver-tests.shagainst the server (now--history 1h) and in the process; the MCP toolsciteandforget_subject(--allow-erasure). Fixed on the way: a statement reading a tableAS OFfailed when prepared (the extended protocol’s Describe binds it without a clock:Session::describenow runs under one). -
2026-11-14 — §M14.24 R6, backups and subjects’ keys:
BACKUP TO 'dir'(online, one snapshot, without index pages or samples) andnucleus restore(backup::restore: indexes and statistics rebuilt); each entry about a subject sealed under its subjects’ keys (subject_keys, the server’s--subject-keysfile), whichFORGET SUBJECTdestroys — a restore of an older backup leaves the subject out and blanks the audit details naming it;Kv::files. Fixed on the way:FORGETof an analyzed table failed after its commit (“now() outside a statement”: its scrub analyzes again, now under a clock). -
2026-11-14 — §M14.24 R5, citations and read records:
recallreturnsas_of(snapshot_commit());SET request_idrecords each query’s read — commit, tables, ids returned, parameters — as an audit record of kindread, shown innc_catalog.reads;FORGET SUBJECTblanks them and its purge reaches the history kept by time; the MCPrecalltool and the Python and JavaScript helpers carryas_of. -
2026-11-13 — §M14.14 TT5, time travel checked and free: a logged workload read back at random times through every index kind (
tests/time_travel.rs); commit times as deferred puts (Store::write_deferring,Store::deferred,DEFERRED_MAX, WAL batch version 3) — 8 threads’ one-row commits were 28% slower with a time record rewriting a leaf each, now within the spread;snapshot_atsearches up to the visible commit (20 → 5.5 µs);crates/kv/examples/bench.rstakesNUCLEUS_HISTORY. -
2026-11-13 — §M14.14 TT1–TT4, time travel: with a retention by time (
EngineOptions::history_time,nucleus_kv::Options:: history_time) each commit records its time (00 05 | ts → µs, monotonic);Kv::snapshot_at,commit_time,reach.BEGIN … AS OF TIMESTAMP | SYSTEM TIME | COMMIT expr,SET TRANSACTION AS OF …, the session’sread_as_of;FROM t AS OF … | FOR SYSTEM_TIME AS OF …(Plan::Past);CREATE TABLE … AS query [WITH [NO] DATA];WITHreserved;nucleus server --history <duration>,nc_catalog.history(Kv::history_time,Kv::newest). -
2026-11-13 — §M14.29 S2, a fuzzing find: a SCRAM client (the Rust crate, the Python, JavaScript, Java and C drivers) refuses a server’s iteration count above 1 000 000 (
SCRAM_MAX_ITERATIONS). -
2026-11-13 — §M14.24 R4, fast retrieval:
recallbatched throughLATERAL(BM25’s statistics subquery correlated when its query reads an enclosing row); a projection evaluates calls that read no row once (exec::row_free_evaluated); an embedding round vacuums the queue’s range;tests/recall_bench.rs. A vacuum’s sweep logs the ranges its deletes cover (Store::write_covering, WAL batch version 2) and replay deletes what is left in them — a commit’s leaf filter had dropped, unlogged, a value under a tombstone the sweep then removed, and a crash brought the deleted row back. -
2026-11-13 — §M14.24 R3, permissioned retrieval checked:
tests/permissioned_retrieval.rs— HNSW, BM25,@@,rrf,convexunder a tenant policy on a table and a partitioned one equal to the policy written out;recall()andREMEMBERwithin a subject. BM25’s statistics on a partitioned table under row-level security are the readable partitions’ (Binder::readable_parts,IndexMethod::function’sparts,text_stats’s fourth argument,text::index::stats’sonly). -
2026-11-13 — §M14.24 R2b, the scrub: after a
FORGET‘s commit the reached tables’ structures are rewritten without the rows (an HNSW graph’s cut nodes zeroed —IndexMethod::scrub—, text and sparse segments with deleted documents merged, column segments with deleted rows rewritten —column_store::scrub—, samples taken again), the in-memory caches by content emptied, then the KV store’s scrub (Kv::scrub:Engine::purge_range,Store::scrub— WAL rolled and its dropped segments and spares zeroed, free pages zeroed byPager::zero_free) and a search of every file for the rows’ values (Kv::find_bytes,nucleus_storage::scan);FORGETreturnsscrubbedandfound, the erasure record (version 2) keeps them and the audit records blanked; audit records of version 2 hash their detail’s digest so an erasure blanks the details holding the subject with the chain intact (nc_catalog.audit.erasure); the drivers’ helpers return all four. R2c: the search anchored by rarity and filtered by a hashed bitmap (aFORGETon 96 MiB 1.05 → 0.41 s);tests/erasure_bench.rs, the planted-corpus measurement. -
2026-11-13 — §M14.24 R2a,
FORGET SUBJECT: subject columns (ALTER TABLE … SET / DROP SUBJECT; a memory store’ssubjectmarked), table record version 18;FORGET SUBJECT valuedeletes the subject’s rows from every table with subject columns as the caller, referencing tables first, all or nothing under row-level security; the erasure record andnc_catalog.erasures;statements::redactedmasks aFORGET‘s constants; the Python and JavaScript drivers’forget_subject/forgetSubject. -
2026-11-13 — §M14.24 R1, memory stores:
CREATE MEMORY STORE,REMEMBER(merge,REPLACING),recall()inFROM(bound as a hybrid query;Binder::expansions),ALTER TABLE … SET / DROP EXPIRYandexpiry::expirein the maintenance thread (nucleus_server::maintain_with, with the edition’s registry); table record version 17 (expiry,MemorySpec);nucleus mcp --memory(remember,recall,forget; the MCP module’sOptions::memory); the Python and JavaScript drivers’remember,recall,forget. Without statistics, a key range that is an equality on its index’s whole key is no longer replaced by an index method’s condition (§8.17).REMEMBER‘s merge also finds memories whose vectors the queue has not made yet (it embeds their texts; the model’s cache has them).ts_headlinebounds itsORs’ combinations of matches (54000; a fuzzing find, §8.22). -
2026-11-13 — §M14.23 step 3, iOS and Android: the Swift driver (
drivers/swift:Nucleus, andNucleusEmbeddedoverNucleusEmbedded.xcframework,build-xcframework.sh); the Android library (drivers/android:build-native.sh, the JNI glue, Kotlin’sDatabase, the Java driver inside); the C driver’snc_connect_io(nc_io), the Java driver’sNucleusClient.connect(in, out, transport, config)and its use of APIs Android 8 has;examples/swift-cli,examples/ios/Notes.swiftpmandrun.sh,examples/android/notesandrun.sh;scripts/adb-run.sh; CI’siosandandroidjobs andswiftindriver-tests.sh. Opening a directory syncs only the parents of the levels it made (it synced every ancestor, and Android lets an app open none above its own). -
2026-11-13 — two bugs CI’s fuzzing found: a statement nested a thousand levels deep (or twenty thousand
ORs) overflowed its session’s stack, which aborts the process — any client could stop the server. Now a statement’s nesting is bounded (§8.3:MAX_NESTING,54001) and sessions’ threads have 16 MB of stack. A time zone split inside a two-byte character panicked ('2007-1ɚ0'::time); now22007. -
2026-11-13 — §M14.23 step 2, the browser (WASM): the engine on
wasm32-wasip1(CI’swasmjob: platform conformance, storage, transactions, SQL and slt under Node’s WASI,scripts/wasi-run.mjs);nucleus_platform::{temp_dir, process_id};nucleus_platform::slots(Slots,SlotFs,SlotPlatform,MemorySlots);nucleus_server::Exchange;Database::exchangeand the C API’snce_exchange,nce_feed,nce_exchange_ended,nce_exchange_free,nce_alloc,nce_dealloc,nce_pool_free; JavaScript split intocore.ts,index.ts(Node) andbrowser.ts(withwasm.ts,worker.ts,opfs.ts,node-slots.ts,bytes.ts), SCRAM on WebCrypto;examples/browser/;driver-tests.sh js-wasmwithdrivers/js/test/browser.mjs(headless Chrome).COPY’s text format checks each field as UTF-8 (a fuzz finding). -
2026-11-13 — §M14.23 step 1, the embedded edition in Python and JavaScript:
editions/embedded(nucleus-embedded:Database,Connection, the C APInucleus_embedded.h);nucleus_platform:: memory(MemoryFs,MemoryPlatform);nucleus_server::Stopandmaintain_until;nucleus_sql::embedding::stop;nucleus_client::Client::over; Pythonnucleus.open,Database, connection strings inconnect,build_wheel.py; JavaScriptDatabase,connect(string, options),native/addon.candbuild.sh;driver-tests.shpython-embeddedandjs-embedded;examples/*/anywhere. D15 (versioning) decided. -
2026-11-13 — §M14.29 S2, fuzzing:
fuzz/— tencargo fuzztargets (§2), seeds (fuzz/seeds.py), CI’sfuzzjob and the fuzz crate in the lint job. The front ends serve any byte stream (nucleus_server::handle_native_stream,nucleus_pg_compat::handle_stream). Fixed:websearch_to_tsqueryon a multi-byte character after a word (a panic); Bind’s negative counts (a panic, now08P01); a columnar load’s row count past its batch (an allocation, now08P01); the buffer pool’s flush made every frame (the first checkpoint allocated the whole cache;BufferPool::frames_made); a B-tree node with keys out of order (Node::decodeand sibling merges refuse it,Corrupt, instead of a panic).nucleus-http’sRequest::totalbounds a whole exchange;models::Request::time_leftandext::time_leftgive a call the statement’s remaining time (embedding providers stop by it); a local model’s file is at most a quarter of the machine’s memory. -
2026-11-13 — model URLs on a list: database setting
model_urls,ModelProvider::urls,models::split_url/url_under; checked atCREATE MODEL(not for administrators) and at every call by the owner’s standing. -
2026-11-13 — §M14.22, a review’s fixes: an embedding column’s expression may not call
embed(0A000); a row whose text fails fails its job only; a round’s panic is an error; the server’s worker woken after the writer commits;ADD COLUMN … GENERATED BY EMBEDDING,SET MODEL,swapandCREATE TABLE … CHUNKS OFread validated, andswapgives a row without a next vector a job;DROP MODELrefused under a chunk table, whose writers need noUSAGEon its model (models::count_tokens_unchecked);ATTACH PARTITIONrefuses chunked tables; batches answered beside a failed one kept; local models’config.jsonnumbers bounded, tensor sizes checked, Unigram pieces at most 1 KiB, redirects only tohttps://;nucleus-httprefuses URLs with spaces or control characters and chunk sizes that would wrap. -
2026-11-13 — §M14.22 E8b, the end-to-end check:
bench/embed/beir.py(BEIR documents to ranked chunks by a local model in a server killed twice; the results indocs/benchmarks.md). §M14.22 is done. -
2026-11-13 — §M14.22 E8, what model calls cost: model options
batch_tokens,requests_per_minute,tokens_per_minute,parallel(model record version 3); token buckets per database and model;Request::report_tokens;budget::ModelCostcharged per statement and its workers;EXPLAIN ANALYZE’sModels:line;nc_catalog.statementsmodel_*columns;nc_catalog.modelstokens,throttled_msand the limits;embed_uncheckedtakes whether to wait. -
2026-11-12 — §M14.22 E7, chunk tables:
CREATE TABLE … CHUNKS OF t (c) BY … SIZE … [OVERLAP …] [USING m](chunk_tables), table record version 16 (ChunkSpec),nc_catalog.chunk_tables; writes to a table rechunk its chunk tables in the same transaction;DROP TABLE … CASCADEdrops a table’s chunk tables. -
2026-11-12 — §M14.22 E6, chunks:
chunks(text, by, size [, overlap [, model]])(chunks), UAX #29 sentences (text::sentences,scripts/gen-sentence-breaks.py),ModelProvider::count_tokens(localcounts by its tokenizer),models::count_tokens; table functions may return several columns. -
2026-11-12 — §M14.22 E5, a column moved to another model:
ALTER TABLE … ALTER COLUMN … SET MODEL; next-model jobs (column bit0x8000), their vectors at00 18, the swap transaction; table record keeps the model’s version and next model;nc_catalog.columnsmodel_version,next_model;nc_catalog.embedding_jobs.kind. -
2026-11-12 — §M14.22 E4b, embedding columns:
GENERATED BY EMBEDDING (expr) USING m; the queue at00 17,embedding::work,after_statement,serve(started by the server),drain,rounds_by_caller; backoff with full jitter,Retry-After(models::retry_hint,retry_after), a circuit a model;embedding.pending;embed(q)by a column’s model;nc_catalog.embedding_jobs;Kv::sleep. -
2026-11-12 — §M14.22 E4a, stored generated columns:
GENERATED ALWAYS AS (expr) STORED,428C9; table record version 15; pg-compat’sattgenerated,pg_attrdef,information_schemageneration columns. -
2026-11-12 — §M14.22 E3c, local models in the database: the
localprovider (huggingface,path,endpoint,pooling,threads,batch); model files kept by content at00 16;bench/embed/speed.pyagainst fastembed. -
2026-11-12 — §M14.22 E3b, the encoder:
nucleus-kernelsgains an f32 matrix product (PackedB,matmul),gelu,softmax_rows,layer_norm,add_assign,erf,exp, reached by modules asext::kernels; itsAvx2level requires FMA.nucleus-local-modelsruns BERT and XLM-RoBERTa encoders from safetensors (LocalModel,Encoder), packed batches without padding, the same vector on any threads;bench/embed/encoder.pycompares with ONNX Runtime. -
2026-11-12 — §M14.22 E3a, the tokenizers: new module
nucleus-local-modelswith WordPiece and Unigram tokenizers read fromtokenizer.json, the same ids as Hugging Face’stokenizerson 2.5 million texts;scripts/gen-tokenizer-tables.py(Unicode 8 classes for BERT, Unicode 16 grapheme clusters);bench/embed/models.py,bench/embed/tokens.py. -
2026-11-12 — §M14.22 E2b, models and
embed():CREATE | DROP MODEL … USING provider WITH (…), providers registered (Registry::add_model_provider),hashingbuilt in;embed(text, m [, 'query' | 'document'])with the model’s prefixes,USAGEon models, a content-addressed cache, batches throughcall_batch;nc_catalog.models,nc_catalog.model_providers. New modules:nucleus-http(the oidc module’s client, now shared: any method, headers, status,Retry-After) andnucleus-embeddings(openai,cohere,voyage), in thenucleustool;nucleus sql <dir>seals secrets with the server’s key file too. -
2026-11-12 — §M14.22 E2a, secrets:
CREATE | ALTER | DROP SECRET, sealed by ChaCha20-Poly1305 (nucleus_crypto::aead, RFC 8439’s vectors) under the key hierarchy’s data keysecrets, wrapped by a root outside the data directory (§M14.30 K1), orFROM ENV;GRANT USAGE ON SECRET;nc_catalog.secrets;tests/secrets.rs. The audit log and the query log mask the strings of a statement naming a secret or a password (statements::redacted) — a password was kept as written before.SECURITY.md. -
2026-11-11 — §M14.21 T8c, every kind of table and the wire: the text and sparse indexes on
column,row,columnand partitioned tables — BM25’s statistics a partitioned table’s partitions’ together (text::index::stats), a ranking’s values read from each partition’s index (optimizer::ranked),rrfandconvexover a partitioned table’sAppend(hybrid::fused);tests/text_tables.rs. pg-compat’stsvectorandtsqueryas PostgreSQL’s types on its wire (oids 3614, 3615,pg_type,format_type), their binary forms both ways (tsearch::vector_send/vector_recv/query_send/query_recv),tsvectorsendandtsquerysend;<N>up to 16,384 and the clean-up’s distance unchecked, as PostgreSQL’s;tests/wire.rs’stext_search_types_through_a_real_driverand…_through_nucleus_protocol;bench/text/beir.py --layout. -
2026-11-11 — CI fixes:
ext::textandext::Expr(pg-compat’s text search namednucleus_sql::textand::expr, past the module boundary);tests/vector.rs’s few-groups spill runs until two workers take morsels (a single worker’s groups fit: on a runner of few cores one may take them all). -
2026-11-11 — §M14.21 T8b, PostgreSQL’s ranking and headlines in pg-compat:
ts_rank,ts_rank_cd(tsrank.rs, with a port of PostgreSQL’sqsort) andts_headline(tsheadline.rs) as PostgreSQL computes them; the optimizer passpostponed(output expressions computed aboveLIMIT);tests/tsearch.rswith 2,700 more of PostgreSQL 18’s answers,tests/sort.rs’sthe_output_is_computed_on_the_rows_kept;bench/text/tsearch.py --rank. -
2026-11-11 — §M14.21 T8a, PostgreSQL’s text search in pg-compat:
tsvector,tsquery, the makers and@@(modules/pg-compattsearch.rs), evaluated as PostgreSQL’sTS_execute;ScalarFunction::rewrite(the binder binds the call it gives), by whichto_tsvector(cfg, col) @@ maker(cfg, 'q')becomes the text index’scol @@ q';tests/tsearch.rswith PostgreSQL 18’s answers (bench/text/tsearch_pg.py),tests/slt/03_text_search.slt;bench/text/tsearch.py(against PostgreSQL’s GIN). -
2026-11-10 — §M14.21 T7b, the sparse vector index:
USING sparse(text/index/sparse.rs) on the text index’s storage with weighted documents (Doc::weights,segment::weight_bits,Postings::push_weighted,Store::weighted,segment::merge’sweighted),Scorer::dot;<#>ranked exactly within a margin;bench/text/hybrid.py --sparse(SPLADE, pgvector’s sparse HNSW). -
2026-11-10 — §M14.21 T7a, hybrid search:
rrf(r1, r2, …)andconvex(r1, r2, α)(hybrid.rs; the optimizer passhybrid::fused: each ranking’s first 100 rows by its index,UNION ALL, grouped by the primary key, ranked or normalized over each list);ScalarFunction::found(text_score’s rows are@@’s);bench/text/embed.py(fastembed: bge-small-en-v1.5, SPLADE++) andbench/text/hybrid.py(BEIR: text, vector,rrf,convex). -
2026-11-10 — §M14.21 T6, slop, highlights and snippets:
"a b"~N(Node::Phrase’s slop,query::phrase— Lucene’s sloppy matcher and weight — for rows, segments, BM25 and highlights);highlight(col @@ q [, start, stop])andsnippet(col @@ q [, start, stop, ellipsis, words])(text/highlight.rs,text_highlight,text_snippet) throughScalarFunction::of_condition/bind_condition;bench/text/beir.py --snippets. -
2026-11-10 — §M14.21,
@@estimated by the text index:IndexMethod::selectivityandindex_method::selectivity, asked byStats::sampledbefore the kept sample; the text index’s from its words’ document counts (query::share). An analyzed table’s text query no longer analyzes the sample’s texts at each planning (SciFact 46 → 0.27 ms a query).59_text_score.sltchecks the estimates. -
2026-11-10 — §M14.21 T5c, scores read from the ranking:
IndexMethod::values(the text index’s BM25) andRankAsk::values;MethodRank::value— the ranked call, its value one more column past the table’s (Plan::width,Access::valued);optimizer::rankedrewrites the projection’s call to read it (one table’s scan, not anAppend);execappends the call’s value where the index did not rank (method_rowssays whose rows they are);prunereads the call’s columns for it; the text index pushes each row’s score;EXPLAIN… with values;tests/text_index.rs,59_text_score.slt(§8.17, §8.19). -
2026-11-10 — the index cache sized by the machine:
nucleus_platform::real::physical_memory(macOShw.memsize; LinuxMemTotaland the cgroup v2 / v1 limit;Noneelsewhere);object_cache::budgeta quarter of it unless--index-cachesets it (1 GB where unknown),nucleus_sql::index_cache; the server’s first line names it (§3.2, §9). -
2026-11-10 — §M14.21 T5b, block-max MaxScore and a parallel build: segments version 2 (
segment.rs: a skip list per term in more than one block — last document, bytes, the (frequency, length) impacts no other pair beats;Segment::blocks,Segment::block; version 1 read); scores in fixed point (score::fixed, units of 2⁻³², the same sum in any order); windowed MaxScore over the impacts (store.rs:max_score,Cursor,Top),View::ranked(q, sc, n)andRanked::complete,nsized by the expected share and every match scored where it is a 64th of them, a second pass sized by the share seen,every_matchterm at a time;CREATE INDEX … USING texton the statement’s workers (TextIndex::build,Store::append_segments,Store::merge_all/merge_due,segment::mergein runs: one segment up to 3 GB); the server’s--index-cache(object_cache’s budget; by default a quarter of the memory the process may use,nucleus_platform::real::physical_memory);bench/text/beir.pyloads MS MARCO in parts (--split,--queries,--index-cache);tests/text_index.rspruned_as_scored_in_full(§8.19, §9). -
2026-11-10 — §M14.21 T5b, found rows by a merge with the table’s scan:
KvChunks::seekandnext_chunk_where(keys a predicate takes, the rest passed by their keys, their values not read), the engine’sScan::seek, the B+tree’sRange::next_key_into/value_into;TableStorage::rows_at(rows to a callback, the share measured kept by the caller),exec::entries_at(a lookup each or reading on, by the share wanted, measured as it goes; the scan opened only where it reads),exec::rows_at(runs on the workers);exec::method_rowsreads the found rows a block at a time through it; the text index’s rank still a lookup each (measured);tests/text_index.rsties at every limit (§6, §8.17, §8.19). -
2026-11-10 — §M14.21 T5a, one ranking for every method:
IndexMethod::ranks(withnulls_first),rank_cost,rows,rank(RankAsk,RankCost,Keep,Among;Pksmoved toindex_method),rows_wherewithout its rank;Access::Nearestgone,Access::Method { index, served, rank }withplan::Served(above: a statement’s condition over a row-level security barrier) andMethodRank’swithin,share,checks,partition;optimizer::rankedin place ofnearestandmethod_ranks,method_filtersunder a barrier;exec::method_rows,ranked_rows,among,unserved; HNSW’s cost,among_mostand partitions behind itsrank; the text index ranks with filters, key filters and policies (View::ranked,Ranked), and its matches are what HNSW ranks among (among ix: body @@ …);tests/text_index.rs(filters and row-level security against the unranked order),59_text_score.slt,bench/text/beir.py --filters(§8.17–§8.19). -
2026-11-09 — §M14.21 T5, BM25:
score(col @@ q)— Lucene’s BM25 over the index’s statistics read once a statement (text_statsin an uncorrelated subquery,text_scorea row),k1andboptions;ORDER BY score(...) DESC LIMIT kranked by the index from its postings (a bag of words term at a time), the same numbers as a row’s;IndexMethod::function,ranks,rows_where’sRank,Access::Method’srank,optimizer::method_ranks; versions counted only where a tombstone names them, unions of many lists by a bitmap (count(*)of a FiQA query 3.2 → 1.4 ms);59_text_score.slt, rankings intests/text_index.rs,bench/text/beir.py(§8.17, §8.19). -
2026-11-09 — §M14.21 T3–T4, the text index:
USING text (col) WITH (analyzer = …)— deltas and tombstones, segments of bit-packed 128-blocks, deleted objects, seals and logarithmic merges, exact matches and BM25 statistics in every snapshot (text/index/);IndexMethod::operand,serves,rows_where,Access::Method,optimizer::method_filters,exec::method_rows, the binder’sindex_operand;object_cache(shared with HNSW, withobject_id);tests/text_index.rs,tests/text_index_crash.rs,58_text_index.slt; indexed queries inbench/text/analyzers.py(§8.17, §8.19). -
2026-11-09 — §M14.21 T2, text queries:
text @@ queryon rows — Lucene’s syntax (words, phrases,*prefixes,~fuzzy terms,+,-,AND,OR,NOT, parentheses), parsed once into leaves and a boolean tree, a batch kernel;Analyzer::normalize; queries inbench/text/analyzers.py(§8.19). -
2026-11-09 — §M14.21 T1, text analyzers:
text::Analyzer, registered by name (Registry::add_analyzer,nc_catalog.text_analyzers); UAX #29 words from generated Unicode 16 tables, Porter’s stemmer (Lucene’s), Snowball 3.0.1’s stemmers for thirteen languages (generated Rust, vendored) with Snowball’s stop words, a trigram analyzer;tokenize(text [, analyzer]);bench/text/data.py(§8.19). -
2026-11-09 — §M14.12 V7, closing vectors: vectors and sparse vectors stay in their row however long (
Type::stored_with_row,large::out_of_line_value;crates/sql/tests/large.rsvectors_stay_in_their_row); exact searches held to the workers (crates/sql/tests/vector.rsexact_vector_searches_run_on_the_workers);sparsevecin every driver (RustValue::SparseVector, CNC_SPARSEVEC/nc_sparsevec, C++ / Python / JavaScript / JavaSparseVector) and on pg-compat (oid 13203, pgvector’s binary form); a registered type’sncpparameter kept as its check reads it back (canonical), refused with the check’s SQLSTATE;ext::sparse(§8.1, §8.12, §9, §10, §11). -
2026-11-09 — §M14.12 V7 step 1, query vectors from rows: a subquery that does not read the scanned row is a fixed query vector (
optimizer::fixed,expr::row_free);LATERAL(TableRef::Lateral,binder::item_after,binder::lateral_join; functions inFROMread the items before them), run as an index nested loop’s right side, also on worker threads (exec::parallel_lookupstakes a sort and a limit above a scan and an index method’s search;parallel::SharedTxngives its transaction’s shared reads and instance;budget::workersis 1 on a worker);EXPLAINNested Loop (per row);crates/testkit/slt/55_lateral.slt;bench/ann/related.py;bench/common.pyandbench/ann/related.pyreach the server over::1withNUCLEUS_BENCH_HOST/--host, andncsql -h [addr]:porttakes an IPv6 address; the bench scripts remove their containers’ volumes (§8.3, §8.4, §8.5, §8.18). -
2026-11-07 — §M14.12, vectors against pgvector; V7 planned:
bench/ann/pgvector_ref.py --quantize half|binary --rescore --no-inserts(cosine data too; pgvector’shalfvecandbinary_quantizeindexes) and--server-efsthere and inbench/ann/sql.py(the server’s own time byEXPLAIN ANALYZE);docs/benchmarks.md’s vectors summary; the types table, the HNSW syntax,sparsevecon pg-compat and in the drivers (§8.1, §8.18, §9, §10). PLAN.md §M14.12 V7 recorded as the next step. -
2026-11-07 — §M14.12 V6b, sparse vectors:
sparsevec/sparsevec(n)(sparse.rs:Sparse,View,sparse::distance); the vector distance functions take either type (vectors::distance_function); the law kit’s generator;crates/testkit/slt/54_sparsevec.slt;bench/ann/sparse.py(§8.1). -
2026-11-07 — §M14.12 V6a, quantized HNSW graphs:
WITH (quantize = 'half' | 'int8' | 'binary', rescore = n)(graph::Codec,graph::Space—Params::metricis nowspace;hnsw::servesgives therescoretoo); the kernelsto_half,from_half,l2_squared_half,dot_half,l1_half,dot_u8,l1_u8,hamming;bench/ann/sql.py --quantize --rescore --no-inserts(cosine datasets too),bench/ann/data.py dbpedia-openai3-1536-100k(§8.18). -
2026-11-07 — §M14.12 V5, filtered vector search:
ef_searchcounts the rows that pass (hnsw::Ask, itsshare; the graph asked again as the share passing near the query needs); searches among a filter’s B-tree range, exactly, from the vectors in memory (Access::Nearest’swithin,exec::among,hnsw::among_most,Index::candidates_among,ByRowa hash map behind a read-write lock,Pkspublic); row-level security as the search’schecks(Access::Nearest’schecks;Access::for_each_expr,for_each_expr_mut);PARTITION BY (c, …)on an HNSW index, a graph per value (CreateIndex::partition_by, the method’spartition_byoption,hnsw::Id’spart,Access::Nearest’spartition); a partitioned table’s partitions searched each under theAppend;bench/ann/filtered.py(§8.18). -
2026-11-07 — §M14.12 V4b, HNSW searches while rows come in:
Kv::vacuum_range(Engine::vacuum_range, the vacuum’s sweep in chunks,sweep_chunk) after each seal; a compaction apart from the folds (Index::compaction,put_compaction,install,warm;Compaction); the patches’ levels merged by the logarithmic method; the upkeep only by writing sessions while rows come in (IndexMethod::after_statement(kv, wrote)); seal and fold sizes from the row costs the searches measure; the buffer pool’s flushes a page at a time under the shard’s read lock (§4.3, §6.1, §8.18). -
2026-11-07 — §M14.12 V4b step 4, HNSW settled: the upkeep after every statement outside a block (
IndexMethod::after_statement,index_method::after_statement, renamed fromafter_commit), the rows left sealed noted until folded; a search reads aboutkrows, nearest first, passing over stale ones;crates/sql/tests/hnsw_crash.rs;bench/ann/sql.py(§8.18). -
2026-11-07 — §M14.12 V4b step 3, nearest-neighbour searches in the planner:
Access::Nearest(Access::secondary), the optimizer’snearestpass,exec::nearest;hnsw::search,nearest_rows,rows,serves, the session settinghnsw.ef_search;vectors::Metric::of_function(§8.18). -
2026-11-07 — §M14.12 V4b step 2, HNSW as an index method:
hnsw(graph,store,cache;nearest,status,upkeep_now), registered by the built-in module;IndexMethod::after_commitandindex_method::after_commit, called by the session after each commit;Kv::instance/KvTxn::instance(§6.1, §8.18). -
2026-11-07 — §M14.12 V4b step 1, index access methods:
index_method(IndexMethod:define,write,build,check;Registry::add_index_method);CREATE INDEX … USING method (col opclass) WITH (…); the index record’s method, operator classes and options (table record version 14);nc_catalog.indexes.method,opclasses,options; pg-compat’sindexdefwith them (§8.17). -
2026-11-06 — §M14.27 S8b,
SUMMARIZE: the statement (Statement::Summarize,summarize), read-only and described; the MCP toolsummarize_table(§8.5,SUMMARIZE; MCP in §6). -
2026-11-06 — §M14.27 S8a, drift and tests:
ks_test,auc,psi,js_divergence,chisq_test(§8.5, Drift and tests);quantile::Doubles(the ordered sets’ store for walks in order);quantile::sort_keys, an LSD radix sort for 8-byte keys (modeand the walks). -
2026-11-06 — §M14.27 S7, sampling and splits:
TABLESAMPLE BERNOULLI | SYSTEM (p) [REPEATABLE (seed)](a filter by the primary key’s stable hash withREPEATABLE),hash_unit,reservoir_sample,random();ScalarFunction::parallel_safe;ANALYZE’s Algorithm L reservoir moved tosample::Reservoirand shared (§8.5, Sampling). -
2026-11-06 — §M14.27 S6, sketches:
stablehash(xxHash64 of the key encoding);approx_count_distinct,hll_agg,hll_merge,hll_countand the typehll(HyperLogLog++, Ertl’s estimator);approx_percentile/approx_quantile,ddsketch_agg,ddsketch_merge,ddsketch_quantile,ddsketch_countand the typeddsketch;approx_top_k,approx_top_k_counts(§8.5, Sketches). -
2026-11-06 — §M14.27 S5, ordered sets:
percentile_cont,percentile_disc,modeWITHIN GROUP (ORDER BY …),median,width_bucket,histogram(§8.5, Ordered sets);Aggregate::ordered_setandcheck_direct; the grammar’sWITHIN GROUP; exact selection over order-preserving 8-byte keys, combinable partial states, a radix-partitioned spill pastwork_mem; constant expressions evaluated once per batch in the vectorized executor (§8.5, Batches). -
2026-11-06 — §M14.27 S4·sort, the sort and provided orders:
sorter— normalized-key records with an abbreviated prefix, chunks sorted stably in memory or in scratch runs with a sparse index, a merge split into key ranges on the workers — for every full sort (§8.5, Memory); aSorta primary key’s scan already gives left out, identity projections dropped; unfiltered chains on the workers and aLIMIT’s bound through projections and filters to the scan. -
2026-11-06 — §M14.27 S4, window functions:
OVER,WINDOW,ROWS/RANGE/GROUPSframes withEXCLUDE, every aggregate as a window aggregate (a running state, small frames fed directly, a segment tree of partial states), the ranking and value functions (§8.5, Window functions); aSortper window, a finalORDER BYthe last window gives left out;GroupAccumulator::finish_keeps_state;avgof doubles rounded once (ExactSum::mean). -
2026-11-06 — §M14.27 S3, two variables:
corr,covar_pop,covar_sampand theregr_*family (§8.5, Parallelism);ExactSum::add_productone exact step;BigInt::div_bigKnuth’s long division. -
2026-11-06 — §M14.27 S2, moments:
variance,var_pop,stddev,stddev_pop(and the_sampnames),skewness,kurtosis(§8.5, Parallelism),bigint::BigIntandWide;ExactSum’s state smaller and merged without copies (avgby a million groups 3.2 → 2.0 s). -
2026-11-06 — §M14.27 S1, the exact accumulator:
fsum::ExactSumis Neal’s superaccumulator (§8.5, Parallelism): additions, exact subtraction and products, rounding from the integer; the split law tested at 1–32 workers. -
2026-11-06 — §M14.12 V2b, components by position:
x[i],x[lo:hi],UPDATE … SET x[i] = vfor arrays and vectors (§8.1), through the type capabilityElements(§8.12); Python vectors as(n, d)numpy and Arrowfixed_size_list<float32>(§10); pg-compat’svectoroid,to_regtypeand pgvector’s binary format (§9). -
2026-11-06 — §M14.12 V2, the exact search bound by bandwidth:
large::Chunks(values out of line read beside a batch scan’s rows, §8.1), type lookups kept a thread (§8.12), the server’s--cache(§9). 100k × 768 nearest neighbours 233 → 48 ms, numpy’s 55. -
2026-11-06 — §M14.28 L0, the commit’s bytes: the real platform’s sync is
fdatasyncon Linux (§3.2);FileSystem::writes_in_place(false on Apple’s systems); where true, WAL segments grown ahead by zeros and recycled as spares (§4.5);truncate_beforesyncs the directory before dropping segments (a window the simulation found). On ext4 a one-row commit 16.6 → 4.4 KiB written, ~4× faster. -
2026-11-06 — §M14.12 V1, vectors:
vector/vector(n)(§8.1), theTypecapabilities it needed (arithmetic,modifier/fit,cast_from/cast_to,aggregate), distance kernels innucleus-kernels,ncptag 11 namedvector, and every driver’s native float array (§11);45_vector.slt. -
2026-11-05 — §M14.20 W8, the next batch made ahead: with a fetch size, the server makes the next batch while the client reads one, and sends it when asked (drops it on
c): a cursor of a million rows, 1000 a batch, 600 → 461 ms; a Python stream 2.8 → 2.4 s. W8 closed. -
2026-11-05 — §M14.20 W8, one wire format crate:
nucleus-wireholds the protocol’s versions, kinds, tags, frames, values and columnar layout; the server and the Rust driver use it instead of their four encoders and decoders, the server no longer through the storage’s row encoding. The same bytes on the wire, every type checked. -
2026-11-05 — §M14.20 W8, every driver pipelines:
pipelineandexecute_many(executeMany) in Python, JavaScript, Java, C and C++ as in Rust; a statement for many rows runs all or none, one commit for all — an insert 185 → 11.5 µs a row, 100 a call. The C driver sends a frame in one write and reads through a buffer: a point read 27.5 → 25 µs. -
2026-11-05 — §M14.20 W8, pipelining: the server flushes its replies only when no next message waits in its read buffer; the Rust driver’s
Client::pipelinesends statements 32 KiB at a time and reads their replies. A point read 100 at a time costs 5.8 µs each, one at a time 25.7. -
2026-11-05 — §M14.20 W8, a session’s texts parsed and normalized once: a session keeps a text’s statements as parsed (
Session::parse) and its key in the statement statistics, with the plans’ admission (by_text::ByText, one type for every entry by a text). A parameterized point read on one connection 29.3 → 25.8 µs. -
2026-11-05 — §M14.20 W8, pg-compat’s prepared statements on the session’s cache: Parse describes by the statement’s text, and Bind describes again (from the cache while the catalog holds), refusing a statement whose result changed since Parse with
0A000, as PostgreSQL does — before, it kept Parse’s description and ran the new plan. A prepared point read throughpostgresunchanged, 40.7 µs. -
2026-11-05 — §M14.20 W8, a session’s plans by their text: a query’s plan and a statement’s description kept by its text while the catalog holds, once the text came again (at most 512); a parameterized point read on one connection 39.2 → 29.0 µs.
-
2026-11-05 — §M14.20 W8, a point read set up as one: a scan of one key of a unique index is not cut into morsels;
split_keysfinds each node’s children in the range by binary search; the real platform asks the OS for its CPUs once. A point read on one connection 38.8 → 35.8 µs (literal), 42.7 → 39.9 (parameter). -
2026-11-05 — §M14.20 W8, a session’s catalog cache: the KV store watches key ranges (
Kv::watch,KvTxn::watched_as_at); a session keeps tables, database settings, ACLs, owners and effective roles across statements while no commit writes the catalog — never for a snapshot that reads it otherwise. A parameterized point read on one connection 52 → 42 µs,SELECT 128 → 25. -
2026-11-05 — §M14.20 W7, LZ by wild copies: the decoder copies literals and matches in fixed 16-byte pieces into room left past the output (LZ4’s way), 2–2.5× the one before; ClickBench’s
SELECT *on a column table 133 → 116 ms. -
2026-11-05 — §M14.20 W7, the file grown ahead: the pager writes zeros ahead of the pages it allocates, an eighth of the file at a time (1–64 MiB), so a page written past the old end lands in blocks the file already has. The TPC-H load on row tables 56 → 27 s; a logged
COPYoflineitem22 → 9 s. -
2026-11-05 — §M14.20 W7, page reads without zeroing: the file is read into a buffer each thread keeps, each page copied out once (a read had allocated and zeroed both its run and every page); a batch scan reading no column (
count(*)) does not look into its rows. ClickBench on a row table 6.5 → 6.1 s, itscount(*)93 → 78 ms. -
2026-11-05 — §M14.20 W7, row format version 3: an offset every 16 columns, so a scan reading a few of a wide row’s columns skips at most 15 values to each (
RowHeader::seek, both decoders); text,char(n), bytea and enums under 256 bytes with a one-byte length (tags 22–25, rows only — the wire unchanged); one row writer (encoding::RowWriter). Versions 1 and 2 still read. ClickBench on a row table 7.2 → 6.25 s, its file 984 → 902 MB. -
2026-11-04 — §M14.20 W6, a column table’s point reads: a segment’s directory entry decoded once and cached by its id (it decoded every column’s least and greatest values a lookup); its row keys searched through marks — every 32nd key’s first 8 bytes — first. TPC-H Q19 40 → 37 ms, Q20 167 → 156.
-
2026-11-04 — §M14.20 W6, a small frame for
Expr::eval: its less common nodes evaluated ineval_other, so each node of a row’s expression takes 480 bytes of stack, not 1.7 kB (TPC-H Q18 305 → 262 ms on column tables). -
2026-11-03 — §M14.20 W6, correlated subqueries on the workers: a correlated subquery runs on worker threads for each row, as on the statement’s thread, in a query whose subquery reads only the row it runs for and nothing that differs by thread (
expr::ready_subqueries); a filter or projection with one over rows that are not a pipeline’s runs in blocks on the workers (exec::OnWorkers, shared with an index nested loop’s lookups); the buffer pool’s frames and shards take a cache line each, its hits counted by shard. TPC-H Q20 577 → 173 ms on column tables. -
2026-11-03 — §M14.20 W6, shared reads without a queue: the engine’s intent statuses and running ranges under a reader-writer lock;
KvRead::first(a worker’s lookup of a column table’s segment without read-ahead); no lock for unlogged writes in a transaction without a fresh range;EXPLAIN ANALYZEreads only the columns the query needs (TPC-H Q19’s took 18.6 s, every column oflineitema row). -
2026-11-03 — §M14.20 W6,
DISTINCTinside aggregates as groupings:count(DISTINCT x)and the aggregates beside it become a grouping by the group andx(the others’ partial states) and one by the group (theDISTINCTcall fedx, the others combining) — both the vectorized, parallel grouping;Aggregate::order_freesays which aggregates may be fed so (§8.6, §8.12). -
2026-11-03 — §M14.20 W6, typed aggregate states: a grouping’s
min,max,bool_andandbool_orkeep a value a group, itssumandavgof integers or of decimals at one scale an exact sum and a row count (a general state a group for the rest, and for a sum that meets another scale or kind); anavg‘s partial state is its rows and sum; a grouping counts its states’ bytes as the accumulators tell (GroupAccumulator::group_bytes), so fewer groups spill (§8.5, §8.12). -
2026-11-03 — §M14.20 W6, a decimal division in one step:
/on numerics divides once when the dividend scaled up by the digits asked for (and one to round on) fits 128 bits, else by long division as before; a tiny dividend over a huge divisor gives its zero, not an overflow. -
2026-11-03 — §M14.20 W6, top-N: a sort right below a
LIMITkeeps only the rows the limit takes and skips — a heap of that many (spill::Top; ties in the input’s order, so the rows of the full sort), its rows built only when their keys enter, on each morsel of a parallel sort; pastwork_memthe full sort, as before (§8.5). -
2026-11-03 — §M14.20 W6, groupings past
work_memon the workers: one bound for a parallel aggregate’s groups — pastwork_mema running morsel writes its partial states to scratch by merge part and goes on empty, a morsel done keeps its groups while they fit in half; the merge parts read them back on the workers (they no longer give up and leave it to one thread partitioning rows); merged rows past half ofwork_mema part at a time. Scratch runs are shared between threads and read by byte ranges (Run::at,Sealed::range). ClickBench Q32 2.5 → 0.62 s (§8.5). -
2026-11-03 — §M14.20 W3b, batches into storage: one batch insert path (
dml::insert_batch,TableStorage::insert_batch) forINSERT,COPYand partition moves — rows owned, row ids per batch, foreign-key keys deduplicated, the first error in row order; a column table’s ascending batch gathered at once; segments built from typed vectors on threads (the same bytes as before);COPY’s parse overlapped with its stores (nucleus_kv::Locked);TableStorage::sample, soANALYZEbuilds only the rows it takes. Fixed: enum values read from a column segment lost their labels. TPC-H SF 1: row load ~34 → ~30 s, column load ~34 → ~26 s (§8.7, §8.8, §8.15). -
2026-11-02 — §M14.20 W2, one sorted bulk path:
CREATE INDEX,ALTER … TYPEand key rewrites build their indexes throughIndexBuild: only the index’s columns read, in parallel; entries in one buffer with abbreviated keys, sorted in parallel, pastwork_memone run of byte records per spill merged by a heap; uniqueness by neighbours; written in key order into the fresh range; internal nodes packed to 7/8 as leaves are.exec::index_entry(unused) removed. Fixed: a column-table statement that failed part way left its gathered rows for the next statement on the thread, which stored them past the unique checks. TPC-H SF 1 row load 69.8 → 45.6 s (its indexes 40.3 s when profiled, now 15.8 s). -
2026-11-02 — §M14.20 W1, quick gains:
ANALYZEby Algorithm L (11.5 → 5.5 s onlineitem), row decoding stops after the last wanted column, checkpoints after 1 GiB,--sync ordered|full(D17), 64 KiB wire buffers, the JS driver’s frames joined once. Load 79.4 → 69.8 s. -
2026-11-02 — §M14.20 W0, column tables’ concurrent writes: overlapping writers conflict (
40001) as on a row table; the second’s rows were lost. -
2026-11-01 — §M14.20 V13, decimal vectors:
Vector::Dec— decimals of one scale as their mantissas, decoded so from a column store’s decimal segments and a row table’s numeric columns —, kernels for their+,-,*and comparisons (vector::dec_kernel), andsum/avgadding them at their scale. TPC-H SF 1 on column tables Q1 467 → 185 ms, Q6 143 → 82, Q14 120 → 97, Q15 101 → 74, Q3 162 → 133; on row tables Q1 784 → 493. -
2026-11-01 — §M14.20 V13, key filters, eager aggregation, parallel merges:
keyfilter— an inner or semi hash join whose right side was narrowed hands its integer keys (range, a list of up to 64, else a Bloom filter) to the scans below its probe side (Step::Keys, the range a column store’s segment bound; every executor alike,EXPLAIN ANALYZEmarks the scan);eager— a grouping by a join’s left key over infallible aggregates of the right side computed below the join (Aggregate::infallible); parallel aggregates of many groups merged on the workers a hash part each (MERGE_PARTS), those in key order finished on the workers but for each morsel’s edges; compact partial states (count,min/max/bool_*,sumof no doubles), the accumulators grown by half again, one probe for an integer key; groups by a direct index over a narrow integer range, else a salted table hashing and comparing a batch’s vectors in place (keytable); join tables on two integer keys hashed as a pair, a batch’s lookups before its output, and a build side that is no pipeline gathered in columns (JoinTable::gather; spilled past work_mem as before); dictionary segments decoded and cached as codes and entries (Vector::Dict), a filter’s leading tests of such a column tried on the entries once a segment (vector::DictFilter,Scan::dicts). TPC-H SF 1 on column tables Q1 535 → 471 ms, Q5 528 → 354, Q9 2437 → 946, Q13 367 → 99, Q18 885 → 373; on row tables Q5 1010 → 793, Q9 2950 → 1423, Q13 424 → 173, Q18 1334 → 747. ClickBench on column tables 0.31× → 0.26× PostgreSQL’s time. -
2026-11-01 — §M14.20, TPC-H Q13 and Q16:
columns::Columns— rows a column at a time — for the hash join tables the workers make (the keys too);kernels::like_parts(LIKEwith%inside the pattern), substrings found by their first and last bytes 32 places at a time, the row-at-a-timeLIKEover bytes for ASCII;NOT LIKE’s selectivity 0.9; uncorrelatedIN (subquery)through theIN-list kernel (in_consts, a hash set past eight items);expr::prime_subqueries/vector::parallel_safe_in: uncorrelated subqueries run once before workers use them, the cache shared with the workers (Arcrows). TPC-H SF 1 0.67× / 1.27× PostgreSQL’s time (column / row tables), ClickBench 0.31× / 2.31× (docs/benchmarks.md). -
2026-11-01 — §M14.20, TPC-H Q19 and Q22:
Vector::Char(char(n)from row and column storage, compared without trailing blanks), anIN-list kernel,ScalarFunction::call_batch(substr’s kernel), uncorrelated subqueries evaluated once per batch evaluation; index nested loops on worker threads (vector::on_workers, shared with the morsels); the buffer pool’s hits under its shard’s read lock, page ids hashed by one multiplication; the column store’s cache of decoded columns in 16 read-locked shards under one bound. TPC-H SF 1 0.75× / 1.40× PostgreSQL’s time (column / row tables), ClickBench 0.32× / 2.32× (docs/benchmarks.md). -
2026-11-01 — §M14.20, TPC-H and ClickBench again (at
e2d1afa,docs/benchmarks.md): TPC-H SF 1 1.03× PostgreSQL’s time on column tables and 2.34× on row tables in the geometric mean (1.10× and 2.24× on 10-30); ClickBench 0.34× and 2.47× (0.34× and 2.51×); the loads faster (TPC-H 98 s / 111 s from 118 s / 125 s, ClickBench 18.7 s / 20.9 s from 21.7 s / 21.4 s). Row tables’ times vary between runs by whole queries (Q3 3.2 s in one run, 1.2 s in the next); not yet explained. -
2026-11-01 — §M14.20, the self-join: a hash join whose right side is a pipeline has it collected (its keys evaluated a batch at a time) on worker threads, morsels in key order; the table groups each key’s row numbers in one array (it allocated a vector per key, to make and to free).
SELECT count(*) FROM b x JOIN b y ON x.id = y.vover 1M rows ~490 → ~190 ms: 1.7× PostgreSQL’s (4.2× before). -
2026-11-01 — §M14.20, the load:
put_newnotes the run of keys without an entry up to the tree’s next one, and a bulk insert of new keys in order looks at the tree once, not once a row; a spill checks its keys as a commit does (the recent commits’ keys first), not by a look at the tree per key; a spilled transaction’s commit deletes the intents only of the keys inside its spilled span (it deleted one for every key written after the spill) and builds its ops in key order, without a sort. Per row of the load, fewer allocations: the primary key’s suffix borrowed,||appending to its left text, the casts to a column’s own type first. The 1M-rowINSERT … SELECT~2,000 → ~1,250 ms through the server (~1,080 embedded): 1.2–1.4× PostgreSQL’s. -
2026-11-01 — §M14.20, a commit’s leaves prepared while others are installed: a sorted batch’s workers run for the whole batch, a window ahead of the walk that installs their leaves (it waited for each window, and they for its installs); prepared pages are swapped into the pool’s frames, not copied. The 14,768 leaves of the 10% delete: installed in ~24 ms (the walk was ~37, waiting for windows ~20 of them). A 10% delete ~144 → ~136 ms, a 25% update ~773 → ~750 ms.
-
2026-11-01 — §M14.20, a delete’s rows stashed once:
DELETEfrom a table that is not partitioned writes the rows as the scan stashed them (key first), without stashing each again behind its partition’s number. A 10% delete ~160 → ~141 ms (1.96× PostgreSQL’s time in the same run). -
2026-11-01 — §M14.20, the write set and the recent keys without a tree per key: a transaction’s writes are a sorted vector while they come in order (a B-tree map once they do not), and a large commit’s keys join the recent commits’ as one sorted run; the commits before a snapshot are skipped as a whole. Per written row: a push and one comparison, where it was two tree lookups and two inserts. A 10% delete ~225 → ~160 ms, a 25% update ~935 → ~785 ms, the load ~2 300 → ~2 000 ms; 20 updates of 100 000 rows 5.5 → 4.6 s.
-
2026-11-01 — §M14.20, garbage collected as leaves are rewritten: a commit no longer walks its keys’ versions to delete the old ones; its batch drops them from the leaves it rewrites anyway (a compaction filter,
BTree::apply_sorted_filtered/Store::write_filtered, not logged), for every key there, and its conflict check is answered by the recent commits’ keys, the tree read only for the rest. A 10% delete ~260 → ~225 ms, a 25% update ~975 → ~935 ms; 20 updates of 100 000 rows 6.6 → 5.5 s, the table 32 → 28 MB. -
2026-11-01 — §M14.20, a commit’s leaves on workers: a sorted batch reaching 64 leaves or more merges and encodes them on the CPUs (
BTree::set_workers), installed in order, so the tree is the one a thread makes, page for page; entries go to a node’s children by a search per child. A 10% delete ~310 → ~260 ms, a 25% update ~1 050 → ~975 ms. -
2026-11-01 — §M14.20, less per written row:
UPDATEandDELETEconsume their stashed rows (copied only forRETURNING), a delete computes index keys only for a table with indexes, a row’s key is encoded in one buffer, and a commit’s batch is sorted by the engine and applied as it is (the store copied and sorted it). A 10% delete 341 → ~310 ms, a 25% update ~1 150 → ~1 050 ms, the load ~2 800 → ~2 500 ms. -
2026-11-01 — §M14.20, the write path:
UPDATEandDELETEfind their rows by the vectorized, parallel scan; a write’s early conflict check answered by the recent commits’ keys; a B+tree range descends once (it descended twice), a commit’s checks walk one cursor (Cursor::seek_near), and a sorted batch’s leaves are merged by reference and encoded in place (node::encode_leaf), nothing decoded. Fixed: the recent keys were pruned past the visible snapshot, which a transaction could still begin at — its serializable reads could miss a conflict.bench/run.py: a 10% delete 826 → 341 ms, a 25% update 1 896 → 1 150 ms. -
2026-10-30 — §M14.20 V11, vacuum when idle: the server’s vacuum runs when no transaction began for 10 s and none runs, in batches of 2 048 entries, stopping when one begins and going on from there later (
Kv::vacuum_background,Kv::activity); paced after 10 minutes without a pause. At full speed after each large commit it slowed the index builds,ANALYZEand queries after a load: TPC-H SF 1 row load 182 → 129 s. -
2026-10-30 — §M14.20 V10, more from the V12 measurements: scan filters compare with constant expressions’ values (computed when the plan is made); a column’s two range bounds are estimated together; a semi or anti join hashes its left side when that is the smaller. TPC-H SF 1 on column tables: Q4 1.26 → 0.11 s, Q22 0.87 → 0.24 s, Q6 0.49 → 0.17 s, Q14 0.57 → 0.18 s, Q3 0.36 → 0.19 s.
-
2026-10-30 — §M14.20 V10, from the V12 measurements:
char(n)columns are segment dictionaries and offsets of their own (they were stored value by value), and a dictionary’s row is read where it lies — a column table’s index lookup no longer decodesl_shipmode’s segment: TPC-H Q19 on column tables 42 s → 0.19 s; a query’s correlated subqueries keep their results by the outer values they read: Q17 1.5 → 0.12 s, Q2 0.20 → 0.06 s. -
2026-10-30 — §M14.20 V12, statistics across columns:
ANALYZEcounts the columns of every multi-column key, index andCREATE STATISTICStogether — distinct combinations and functional dependencies — and equalities on several columns, joins on several columns andGROUP BY/DISTINCTare estimated from them;CREATE/DROP STATISTICS;nc_catalog.statistics_objects,.column_groups,.dependencies; table record version 13, statistics version 2. -
2026-10-30 — §M14.20 V11, write intents: a large transaction’s spilled writes are versions stamped with its id (intents), resolved by its status; the commit is a status record and nothing moves after it — every write of a load or an index build written once;
VACUUM(SQL,Kv::vacuum) makes committed intents versions, and the server’s maintenance thread runs it when there are some; store readers let waiting writers first; index builds read their rows in chunks. SF 1:lineitem’sCOPY52 → 38 s, an index on it 30 → 18 s. -
2026-10-30 — §M14.20 V10, OR implications and existence lookups: an OR across two tables pushes each its implied filter (TPC-H Q19 770 → 128 ms); uncorrelated subqueries go below semi and anti joins and existence lookups stop at the first match (Q22 1034 → 386 ms).
-
2026-10-30 — §M14.20 V10, column tables’ point reads: a B+tree range checks its end on the key before reading the value; decimals of one scale packed as integers in segments; one row’s value read from a column’s cached encoding (
segment::value_at); subqueries’ scans decode only their columns; index nested loops on column tables, costed as such;KvTxn::first; a commit’s conflict checks and old versions in one walk per key. Fixed: an index nested loop’s right side reads its left row one level down — the plan walkers that move references now count it (XX000 outer column out of rangeon TPC-H Q2 over column tables). SF 1 in columns: the load 675 → 136 s; Q17 timed out → 1.4 s, Q20 → 0.6 s, Q21 4.7 → 1.2 s. -
2026-10-30 — §M14.20 V10, scans that want one entry: a transaction’s scan reads ahead 8 entries at first, doubling to 128 — a column table’s segment lookup read its whole directory per row (an SF 1
lineitemloads into columns in 84 s, from most of 729);DELETEof short rows without reading them again. -
2026-10-30 — §M14.20 V10, vectorized joins and more: hash joins probed a batch at a time and in parallel; narrow rows through joins; the executor’s tables on a fast hash; parallel sorts; decimal sums without dispatch;
CREATE INDEXwrites declared fresh (KvTxn::fresh: no conflict checks or old-version collection for a new index’s keys);COPYandINSERTtell a duplicate and a conflict from one look at the key (KvTxn::put_new), encode rows without a buffer per value and parse decimals without building strings. SF 1 on rows, all 22 queries 35 → 26 s (Q9 6.7 → 2.9 s, Q13 2.5 → 1.3 s). -
2026-10-30 — §M14.20 V10, index nested loops:
JoinAlgo::Lookupchosen by cost; semi and anti joins placed among the ordered joins by estimate; parallel aggregates in key order merged a morsel edge at a time; key-aware join estimates in every estimate. SF 1 on rows, all 22 queries 125 → 35 s (Q2 14 → 0.16 s, Q18 25 → 1.7 s, Q21 11 → 3.0 s). -
2026-10-30 — §M14.20 V10, from the TPC-H profile: joins on a key of two columns estimated by the key (Q9 26 → 6.7 s at SF 1); semi and anti joins placed below the inner joins (Q18 25 → 9.6 s); the buffer pool in shards, each its own lock; CRC-32C by the CPU’s instructions; LZ matches copied a period at a time, and only values of 1 KiB or more compressed; decoded column segments cached by size, those used longest ago evicted (column tables’ point reads no longer decode a segment each).
-
2026-10-30 — §M14.20 TPC-H (V10, second part):
bench/tpch.py(generated TPC-H data, the 22 queries, results checked against PostgreSQL’s);EXISTS/NOT EXISTS/INunnested into semi and anti joins; common conjuncts taken out ofOR;INTERVAL '90' DAYliterals. Fixed: a correlated subquery in a join’sWHEREreading both sides was pushed into one (XX000 outer column out of range), and references inside correlated subqueries now follow their rows when the optimizer moves conditions;COPYinto acolumntable lost its rows (its statement’s writes were never finished), and into a partitioned table wrote the parent. -
2026-10-30 — §M14.20 results columnar end to end (V10, first part): a vectorized query’s batches go into
ncpcolumnar results as columns (Sink::batch,vector::batches, the server’scolumnar::Builder); a million numeric rows into numpy 262 → 92 ms (row table), 241 → 51 ms (column table); the Python driver cuts text columns from one decoded buffer. -
2026-10-30 — §M14.20 partitioning (V9, second part):
ATTACH PARTITION,DETACH PARTITION,DROP PARTITION; storage policies by age (SET STORAGE POLICY (storage AFTER interval) | NONE), applied when set and by the server’s maintenance thread. -
2026-10-30 — §M14.20 partitioning (V9, first part):
PARTITION BY RANGE | LIST | HASH,PARTITION OF … FOR VALUES … | DEFAULT; partitions pruned when the plan is made and when it runs; inserts routed, updates moving rows; indexes and columns on every partition;nc_catalog.partitions;partition_hash. -
2026-10-30 — §M14.20 storage per table and per column (V8):
row, column(both copies; the column copy of every column or some),ALTER TABLE … SET STORAGEconverting online in parts with small switches; deletion markers by row; acolumntable’s delta store under its own index. -
2026-10-29 — §M14.20 columnar storage (V7):
WITH (storage = column): column segments (bit packing, runs, dictionaries), a delta store, deletion markers, merges; scans of only the wanted columns, segments skipped by their least and greatest values;nc_catalog.segments. A million-rowsum22 → 2 ms. -
2026-10-29 — §M14.20 table storage as a module (V6): the
TableStoragetrait and registry (Registry::add_storage),rowbehind it;CREATE TABLE … WITH (storage = name),nc_catalog.tables.storage,nc_catalog.storages. -
2026-10-29 — §M14.20 compression (V5): leaves store their keys’ shared prefix once; values of 64 bytes or more are stored LZ-compressed when that pays; format version 2 (version 1 read). A million-row table’s file 93 → 61 MB.
-
2026-10-29 — §M14.20 parallel execution (V4): the KV contract’s
shared,split_pointsandparallelism; aggregates and filtering pipelines run on worker threads by morsels, combined in key order;parallel_workers; exact sums of doubles. A million-rowsum77 → 27 ms, the 1000-groupGROUP BY100 → 37 ms. -
2026-10-29 — §M14.20 batch kernels (V3):
nucleus-kernels— comparisons, arithmetic, sums, minima and maxima, selection, string equality andLIKE, hashing — per CPU level (AVX2, AVX-512, NEON), each tested against its scalar reference; text and date / time vectors. A million-rowsum90 → 77 ms. -
2026-10-29 — §M14.20 the vectorized executor (V2): pipelines of scans, filters and projections a batch at a time, vectorized aggregates (
Aggregate::grouped),batch_size; the test kit’s scripts run three ways. A million-rowsum265 → 90 ms, the filtered count and the 1000-groupGROUP BYlikewise. -
2026-10-29 — §M14.20 batch reads (V1): the KV contract’s
scan_chunks; the B+tree, the engine and table scans read through reused buffers instead of allocating per entry. A million-rowcount(*)360 → 200 ms,sum430 → 265 ms. -
2026-10-27 — §M14.11 shipped: streaming and columnar results, bulk load, large transactions, a memory-bounded executor, faster B+tree paths, the benchmark suite in CI.
-
2026-10-27 — §M14.11 benchmarks (L8):
bench/run.py, one workload on nucleus and PostgreSQL; a CI job againstpostgres:18;docs/benchmarks.md. -
2026-10-27 — §M14.11 scans decode only the columns used (L7):
prunemarks each scan’s needed columns; the rest are skipped undecoded (out-of-line values unfetched). -
2026-10-27 — §M14.11 faster checksums, a larger cache (L7): CRC-32C by slicing-by-8; buffer frames made when first used; the default page cache 128 MiB.
-
2026-10-27 — §M14.11 the B+tree’s read and write paths (L7): pages read in place (
node::View) bygetand cursors; batches applied in one sorted pass; leaves packed fuller on sequential inserts. A 2-million-row load: 197 s → 13 s. -
2026-10-27 — §M14.11 joins past work_mem (L6c): grace hash joins, block nested loops, full joins that no longer collect their output.
-
2026-10-27 — §M14.11 aggregation, DISTINCT and set operations past work_mem (L6b): groups, rows seen and counts kept in memory up to the limit; the rest partitioned by key and taken in turn.
-
2026-10-27 — §M14.11 a memory-bounded executor, first part (L6a):
work_mem; external merge sorts; materialised CTEs, recursion and the rows writes collect spill to scratch space (the KV contract’sscratch());generate_seriesstreams; ANALYZE samples tables past 30 000 rows. -
2026-10-27 — §M14.11 large transactions (L5b): writes past
txn_memoryspill into the store’s side area; the commit stays one atomic batch (a status record), the side area is then moved into versions while readers merge it; rollbacks, drops and crashes leave nothing. -
2026-10-27 — §M14.11 bulk load in the drivers (L5):
copywith text or CSV in every driver;loadof rows, columns, DataFrames and Arrow tables as columnar batches in Python, JavaScript and Java. -
2026-10-27 — §M14.11 bulk load (L5):
COPY t [(columns)] FROM STDINin text and CSV, parsed as the data arrives, each row checked as an INSERT’s;ncp‘sI,d,B,e,f; the Rust driver’scopy_inandcopy_rows; pg-compat’s COPY sub-protocol (psql’s\copy, drivers’copy_in);ncsql \copy. -
2026-10-27 — §M14.11 columnar results in the drivers (L4): Python (numpy, Arrow, pandas, polars), JavaScript (typed arrays), Java (buffers), C and C++ (pointers) read batches in place.
-
2026-10-27 — §M14.11 columnar results (L3):
ncpversion 7’s result format 2 sends batchesB, a buffer per column (fixed widths back to back, variable widths as offsets and bytes, a validity bitmap, 8-byte aligned); the Rust driver’sClient::batches. -
2026-10-27 — §M14.11 streaming results and cursors (L1, L2): a query’s rows go to the client as the executor produces them;
ncpversion 6 fetches them in batches (Q’s fetch size,S,F,c); a cursor in every driver; pg-compat streams simple queries and Execute without a row limit. -
2026-10-23 — §M14.10
docs/llm.md(B4) — §M14.10 shipped: a compact, model-oriented reference of the dialect, its gaps with what to use instead, the catalog, hints and the analyzer. -
2026-10-23 — §M14.10
nucleus mcp(B3): themcpmodule, a Model Context Protocol server over stdio — tables (with comments), their descriptions, samples, read-only queries with row and time limits, plans, lint, writes when allowed;nucleus mcpfor a directory or a server. -
2026-10-23 — §M14.10 comments and hints (B1, B2):
COMMENT ON TABLE / COLUMN(table record version 9; nc_catalog,\d, pg-compat’s descriptions); errors with a hint — the name meant, the names there are, the cast — onncpversion 5 and pg’sH, in every driver and ncsql. -
2026-10-23 — §M14.9 the index advisor (A4) — §M14.9 shipped:
nc_catalog.index_advice, the recorded statements planned again with hypothetical indexes; the analyzer in §8.13. -
2026-10-23 — §M14.9 the linter (A3):
ANALYZE QUERY <statement>andncsql \lint— full scans under a selective filter, comparisons that defeat an index, foreign keys without an index, cartesian products,NOT INover a nullable subquery;ncsql \statements. -
2026-10-23 — §M14.9
EXPLAIN ANALYZEand statement statistics (A1, A2): every plan node measured (rows, starts, time) beside the estimates;nc_catalog.statementsper role and normalized statement,nc_statements_reset();Kv::elapsed, the monotonic clock. -
2026-10-23 — §M14.25 audit (T7) — §M14.25 shipped: a hash-chained audit log in the catalog: logins, DDL and every change of access, statements by role or table as the database’s settings ask; written with what it records;
nc_catalog.auditandaudit_chain, which find an edit, a gap or a cut end. -
2026-10-23 — §M14.25 protection (T6): database settings (
ALTER DATABASE … SET), password length / name / lifetime rules, failed logins slowed and locked, connection limits, statement timeouts and token budgets (rows, scan, rate), the insecure start refused. -
2026-10-23 — §M14.25 access rules (T5):
CREATE / DROP ACCESS RULE(role, address, front end, method, TLS;ALLOW [READ ONLY] [AS ROLE r]orREJECT; first match),GRANT … WHEN (…)memberships held only under their condition, the connection as read-only settings,nc_catalog.sessionsandaccess_rules, the PROXY protocol from trusted proxies; tested over real sockets from several addresses. -
2026-10-23 — §M14.25 LDAP (T4): the
ldapmodule — passwords of roles without their own checked by a directory (bind, or search and bind; LDAPS, StartTLS), asked for only over TLS (PLAINonncp, the cleartext method on pg-compat); every driver answers PLAIN, over TLS. -
2026-10-23 — §M14.25 OpenID Connect (T4): the
oidcmodule — identity tokens through OAUTHBEARER onncp, their claims as read-only settings (nucleus.claims.*,55P02), a role claim’s roles for the session;--oidc-*,ncsql --token; a token option in every driver. A bearer login needs an existing role that may log in even while the database is unclaimed. -
2026-10-23 — §M14.25 SCRAM-SHA-256-PLUS on
ncp(T4): over TLS the server offersSCRAM-SHA-256-PLUS SCRAM-SHA-256; every driver binds its proof to the session (tls-server-end-point), or sendsywhen the offer is missing. -
2026-10-23 — §M14.25 SCRAM-SHA-256-PLUS (T4): pg-compat binds SCRAM to the TLS session (
tls-server-end-point;TlsInfo::channel_binding), checked withpsql channel_binding=requireon RSA SHA-256, RSA SHA-384 and ECDSA SHA-384 certificates. -
2026-10-23 — §M14.25 client certificates (T4):
--tls-client-ca; a verified certificate naming the user logs it in without a password, on both front ends; client certificates in every driver andncsql. -
2026-10-23 — §M14.25 TLS (T4): the
tlsmodule (rustls):ncpclients start a handshake before Hello, PostgreSQL clients sendSSLRequest;--tls-cert/--tls-key,ncsql --tls | --tls-ca | --tls-no-verify; TLS in all six drivers (C with OpenSSL behindNC_WITH_OPENSSL); the core gains onlytransport(Stream,Tls). The Rust client tries every address a host name has. -
2026-10-23 — §M14.25 tokens (T4):
CREATE TOKEN … [READ ONLY] [ON TABLE …] [VALID UNTIL …],DROP TOKEN; a login name and a secret, proved by SCRAM in every driver andpsql; the session runs as the token’s role under its ceiling (access::Ceiling, kept throughSET ROLE);nc_catalog.tokens. -
2026-10-23 — §M14.25 SCRAM on the wire (T4):
ncpversion 4 — the password is proved by SCRAM-SHA-256 (A/amessages), never sent; the server signs back; unknown users get a stable fake salt. Every driver speaks it; older clients still log in with a cleartext password. pg-compat logs in by SCRAM-SHA-256 too (PostgreSQL’s SASL; checked withpsql’srequire_auth=scram-sha-256). -
2026-10-23 — §M14.25 row-level security (T3): policies (permissive and restrictive, per command and role,
USING/WITH CHECK),ENABLE/FORCE ROW LEVEL SECURITY, a barrier node the optimizer respects,current_settingandRESETin the core;nc_catalog.policies. -
2026-10-23 — §M14.25 privileges (T2):
GRANT/REVOKEon tables and columns, schemas, functions, types and the database,WITH GRANT OPTION,PUBLIC, default privileges; checked when a user’s statement is bound and before DDL; enum owners;nc_catalog.grants. -
2026-10-23 — §M14.25 users and roles (T1): roles in the catalog (
CREATE / ALTER / DROP ROLE,CREATE USER, membership with inheritance and admin option,SET ROLE), SCRAM-SHA-256 password verifiers (nucleus-crypto), table owners, logins checked against the catalog once a database is claimed (nucleus init),current_user/session_user;nc_catalog.roles,role_members; pg-compat’spg_roles,pg_auth_members,relowner. -
2026-10-22 — §M14.26 shipped. Core types: integers by width,
real,byteaand large values out of line,time,char(n),inet/cidr, enums;ncpversion 3 in every driver. -
2026-10-22 — §M14.26
ncpversion 3: native tags for the new types; every driver speaks it (Rust, C, C++, Python, JavaScript, Java), each with the types both ways in its conformance tests; older clients get what their version knows. -
2026-10-22 — §M14.26 enums:
CREATE TYPE … AS ENUM,ADD VALUE … BEFORE / AFTERandRENAME VALUEwithout rewriting a row (sort keys with room between them),DROP TYPE,nc_catalog.enums. -
2026-10-22 — §M14.26
inet/cidr: addresses and networks, containment operators as index range scans (ScalarFunction:: implied_range), the network functions; pg-compat’s inet and cidr. -
2026-10-22 — §M14.26
char(n): blank-padded text with the standard’s rules; pg-compat’s bpchar. -
2026-10-22 — §M14.26
time: a time of day (input forms,24:00, arithmetic with dates, intervals and times,extract,make_time,localtime); pg-compat’s time. -
2026-10-22 — §M14.26 large values out of line: values over 2 000 bytes, of any type, stored in chunks keyed by their row; kept by updates that leave them; in the consistency check and the crash test;
repeat(). -
2026-10-22 — §M14.26
bytea: binary strings (hex and escape forms,encode/decode,sha256,md5, the byte functions),position(… IN …)andsubstring(… FROM … FOR …)in the grammar; pg-compat’s bytea. -
2026-10-18 — §M14.26
real: a 32-bit float besidedouble precision, PostgreSQL’s float output and range errors for both, float overflow and underflow checked,roundhalf to even;INSERT … VALUESbound against the target columns; pg-compat’s float4. -
2026-10-18 — §M14.26 integers by width:
smallint,integer,bigintas types of their own (ranges, overflow per width, promotion,integerliterals, PostgreSQL 16’s integer input); row encoding version 2;ncp’s own value encoder; pg-compat’s int2 / int4. -
2026-10-18 — §M14.19 shipped: the sample extension (T7).
examples/extension(thegeomodule,geo-demo, the guide for writing a module), held to the module rules by the boundary check;nucleus_server::Config::registry; every driver and edition folder with its own changelog, licence and version. -
2026-10-18 — §M14.19 encoding versions and
ALTER COLUMN … TYPE(T6): values upgraded as read,ALTER TYPE … UPGRADE(crash-tested), key-changing upgrades before the keys are used, newer versions refused;ALTER TABLE … ALTER COLUMN … TYPE … [USING]. -
2026-10-17 — §M14.19 operators and casts (T5b): PostgreSQL’s operator lexing; operators outside the grammar’s own at one precedence, resolved by symbol and types — a type’s distance (
<->), a module’s (Registry::add_operator), or taught (ALTER TYPE … ADD / DROP OPERATOR); casts taught (… ADD / DROP CAST TO);nc_catalog.operators,nc_catalog.casts. -
2026-10-17 — §M14.19 teaching orderings (T5, orderings):
ALTER TYPE … ADD / ALTER / DROP ORDERING … BY mapping,ORDER BY … USING,COLLATEas a text ordering, indexes in an ordering (rebuilt when it is redefined, guarding its drop),nc_catalog.orderings; function volatility. -
2026-10-17 — §M14.19 the law kit (T4):
nucleus_sql::lawsandnucleus_testkit::laws; registration checks a type’s examples. It caught arrays’ key encoding putting aNULLelement first (comparisons put it last): key encoding version 2, and version-1 databases are upgraded on their first write. -
2026-10-17 — §M14.19
uuideverywhere (T3):ncpversion 2 (tag 11: registered types by name and binary form; version 1 still served, with them as text); all six drivers on version 2 with native uuids (RustValue::Uuid, Cnc_uuid, C++Uuid, Pythonuuid.UUID, JS string, JavaUUID) and a generic form for other registered types; pg-compat’suuid(oid 2950, text and binary). -
2026-10-17 — §M14.19
uuid(T3, first part): the type andgen_random_uuid/uuidv4,uuidv7,uuid_extract_version,uuid_extract_timestamp;Rng::fill_unpredictable,Kv::random_bytes;20_uuid.slt, checked against PostgreSQL 18. -
2026-10-17 — §M14.19 types as modules (T1, T2):
ext::Typewith its abilities as separate interfaces; the built-in types registered through it; registered types (Value::Ext,DataType::Ext) stored in rows, keys and the catalog, compared, grouped and listed (nc_catalog.types), and refused where an ability is missing; named types in the grammar; PostgreSQL’s type names and::regclassmoved out of the parser into pg-compat. -
2026-10-17 — §M14.19 modules built to leave the repository: the layout
crates/(core),modules/,editions/; PostgreSQL compatibility ismodules/pg-compat(fromnucleus-sql’spgcatalogandnucleus-server’spg), onnucleus_sql::extalone; the test kitnucleus-testkit(runner and scripts); the CLI iseditions/nucleus;scripts/check-boundaries.pyandscripts/detach-test.sh, and the CI jobmodules. -
2026-10-17 — §M14.19 front ends and authentication registered:
nucleus_server::{FrontEnd, FrontEnds, Authenticator}; the CLI starts the front ends it is given (--front-end). -
2026-10-17 — §M14.19 aggregates and table functions registered:
ext::Aggregate/Accumulator,ext::TableFunction; the built-ins (count…bool_or,generate_series,unnest) register through them;tests/extension.rs. -
2026-10-17 — §M14.19 registries, first part: the extension API (
ext:Module,ScalarFunction,CatalogView,Registry); the built-in functions andnc_catalogregister through it; PostgreSQL compatibility is thepg-compatmodule, in the PostgreSQL front end’s sessions only (nc_catalogno longer goes through it); its scripts intests/slt-pg. -
2026-10-17 — §M14.19 principle audit, first fixes:
now()and retry back-off go through the platform (Kv::wall_clock,Kv::back_off,Clock::sleep);Timestampis opaque; the SQL layer’s format record (00 00); the SQL consistency check and crash test. -
2026-10-17 — the data directory lock: one process at a time per database (§4.6); tested on the OS and the simulation, in the KV contract and with a running server.
-
2026-10-17 — §M14.8 drivers: C, C++, Python, JS/TS and Java beside the Rust one, each with conformance tests;
examples/in every language; the CI jobdrivers. -
2026-10-17 — §M14.7 the nucleus protocol (
ncp): the server’s default protocol (port 20035, user / passwordnucleus); the Rust driver andncsqluse it; PostgreSQL’s protocol is optional (--pg-compat). -
2026-10-17 — §M14.6
ncsql: the nucleus SQL shell, local or over the network, withnc_catalogcommands;nucleus-client; the server’s--log-queries. -
2026-10-17 — §M14.5 SQL completeness: EXCEPT / INTERSECT, FULL JOIN, CTEs (recursive too), NUMERIC and date/time types, arrays, regular expressions, functions in FROM, foreign keys (with validated reads in the KV contract), the
nc_catalogsystem catalog and the PostgreSQL compatibility catalog forpsql’s\d. -
2026-10-17 — §F1 shipped: SQL layer (§M7–§M11), server (§M12), statistics and costs (§M13), serializable (§M14);
nucleus sqlandnucleus server. -
2026-10-17 — §M6.5, nucleus side: the settings service, packaged for d-os.
-
2026-10-17 — §M6 shipped (d-os run pending): KV contract,
Database, CLI, packaging for every platform and d-os, release workflow, benchmark baseline. Version 0.1.0. -
2026-10-17 — §M2–§M5 shipped; §M1 revised. Pager: the durable state is immutable, free list in dedicated pages, no leaks (the first version’s linked list and reserve are gone). Buffer pool, copy-on-write B+tree, WAL + store with checkpoints and recovery, MVCC with snapshot isolation. CI reports test failures as annotations; long tests run on one target.
-
2026-10-17 — §M1 shipped (CI green on all nine jobs): page format, CRC-32C, A/B header, crash-safe free list with reserve, atomic create, poisoning; crash sweep;
[profile.test] opt-level = 1(crash sweep 36 s → 5 s). -
2026-10-17 — §M0 shipped (CI green: lint + all eight build targets). Workspace, platform layer (real POSIX + Windows, simulation with faults and crashes), seed harness, conformance and simulation tests, CI for every build target.