Storage format

The durable keyspaces and stored-value contracts of the storage engine.

Every durable key starts with the root magic 0x7237 followed by one permanently allocated keyspace tag. The normative byte-level specification is protocol/storage.keyform; this page documents the keyspaces and the structured values they store.

Structured values are JSON inside an envelope:

{ "format": 1, "record": { ... } }

The format discriminator names the payload serialization explicitly. The field tables below document the record member of each contract.

Keyspaces

TagKeyspaceKey layoutValue
01datatable:physical_id(t) generation:uvarint primary_key:tuplerecord row_body
02indextable:physical_id(t) index:physical_id(i) indexed:tuple primary_key:tupleencoded primary-key tuple bytes. Invariant: a row with a null in any indexed column has no entry
10catalog_table_objectschema:be32 generation:be64catalog/table.v1. Invariant: immutable once written: publishing different contents under an existing key is a conflict
11catalog_table_headschema:be32text {catalog_version}:{definition_generation}
12catalog_tabletable:physical_id(t)catalog/table.v1
13catalog_table_namename:texttable id text
14catalog_schema_revisionversion:be64catalog/revision.v1
15catalog_write_protocol_objecttable:physical_id(t) generation:be64catalog/write_protocol.v1
16catalog_write_protocol_fencetable:physical_id(t)write protocol generation text
17catalog_fence_table_existencetable:physical_id(t)generation text
18catalog_fence_column_valuetable:physical_id(t) column:physical_id(c)generation text
19catalog_fence_index_accesstable:physical_id(t) index:physical_id(i)generation text
1acatalog_transitiontransition:physical_id(tr)catalog/transition.v1
1bcatalog_transition_deltatransition:physical_id(tr) sequence:be64catalog/index_delta.v1
1ccatalog_transition_delta_sequencetransition:physical_id(tr)next sequence decimal text
1dcatalog_transition_delta_appliedtransition:physical_id(tr)applied sequence decimal text
1ecatalog_transition_unique_claimtransition:physical_id(tr) indexed:len_bytes primary_key:bytescatalog/unique_claim.v1
1fcatalog_transition_unique_violationtransition:physical_id(tr) indexed:bytesindexed tuple bytes
20catalog_transition_violationtransition:physical_id(tr) row_identity:bytescause text
21catalog_retention_pinpin:textcatalog/retention_pin.v1
22catalog_reclamationreclamation:textcatalog/reclamation.v1
30catalog_meta_mode(the tag is the whole key)catalog mode text: direct or schema
31catalog_meta_next_id(the tag is the whole key)next physical identity decimal text
32catalog_meta_schema_version(the tag is the whole key)current schema version decimal text
33catalog_meta_catalog_generation(the tag is the whole key)catalog generation decimal text
34catalog_meta_compacted_through(the tag is the whole key)compacted-through version decimal text
35catalog_meta_transition_seen(the tag is the whole key)wake byte 0x01
36catalog_meta_reclamation_seen(the tag is the whole key)wake byte 0x01
40runtime_writer_fence(the tag is the whole key)opaque writer fence token
41storage_manifest(the tag is the whole key)metadata/compatibility.v1

Tag 00 is permanently reserved: never allocated: guards zero-initialised or truncated keys

catalog/index_delta.v1

One captured write against an index under construction. Writers append deltas in sequence order while the build scans existing rows; the build applies them during catch-up so the finished index reflects every concurrent write.

FieldTypeRequiredDescription
idstringYesDelta identity, {transition_id}:{sequence:020}. Redundant with the key; decode verifies the two agree.
operationput | deleteYesWhether the write put or deleted the index entry.
pkstringYesBase64 primary-key tuple bytes of the written row.
sequenceintegerYesPosition in the transition's durable capture order. The order is the catch-up application order.
tuplestringYesBase64 indexed tuple bytes of the written row.

catalog/reclamation.v1

One durable garbage-collection work item. Replaced definitions, retired physical structures, and finished transition state queue a reclamation; the schema worker sweeps each one in bounded batches, honouring retention pins, until the resource is reclaimed.

FieldTypeRequiredDescription
batch_idintegerCount of durable batches the sweep has completed.
column_idstringPhysical column identity, for column-scoped kinds. Empty when not applicable.
compacted_atstringYesRFC 3339 timestamp of terminal compaction. The zero timestamp means not compacted.
created_atstringYesRFC 3339 timestamp the reclamation was queued.
cursorstringBase64 scan cursor: the last key the sweep processed. Empty before the first batch.
definition_generationintegerDefinition generation to reclaim, for definition kinds. Absent means zero.
generationintegerYesMonotonic checkpoint counter. Every durable step advances it, so a stale checkpoint can never overwrite a newer one.
idstringYesReclamation identity, a structured string derived from the reclaimed resource, for example table-t1 or column-t1-c2.
index_idstringPhysical index identity, for index-scoped kinds. Empty when not applicable.
index_idsarray of stringPhysical index identities, for kinds that reclaim several indexes in one sweep.
items_reclaimedintegerCount of keys the sweep has removed.
kindtable | column | index | table_definition | write_protocol_definition | transition_deltas | cancelled_index | failed_index | replaced_column | cancelled_replacement | failed_replacement | constraint_validationYesThe kind of resource the sweep reclaims.
last_errorstringMessage of the most recent failure. Empty when none.
owner_epochintegerYesEpoch of the schema worker that owns the sweep. A claim with a newer epoch fences a stale worker's writes.
phasestringPosition in the multi-phase sweep, for kinds that reclaim several keyspaces in order. Empty before the first phase.
retired_catalog_versionintegerCatalog version from which the resource is no longer current. The sweep waits until retention allows removal at this version. Absent means zero.
statepending | reclaiming | reclaimed | failedYesSweep lifecycle state.
table_idstringPhysical table identity, for table-scoped kinds. Empty when not applicable.
table_schema_idintegerLogical schema identity of the table. Absent when not applicable.
transition_idstringTransition identity, for kinds that reclaim transition state. Empty when not applicable.
updated_atstringYesRFC 3339 timestamp of the most recent checkpoint.
write_protocol_generationintegerWrite-protocol generation to reclaim, for write-protocol kinds. Absent means zero.

catalog/retention_pin.v1

One consumer's hold on a retained storage resource. Reclamation never removes a resource while a pin covers it, so pinned plans, snapshots, and workers keep reading definitions and data that the catalog has already replaced.

FieldTypeRequiredDescription
created_atstringYesRFC 3339 timestamp the pin was taken.
idstringYesPin identity, a structured string derived from the owner and the pinned resource.
owner_idstringYesIdentity of the owning consumer within its kind.
owner_kindprepared_plan | data_snapshot | replica | cdc | schema_transition | schema_worker | physical_readerYesThe kind of consumer holding the pin.
resourceobjectYesThe retained resource the pin covers.
resource.column_idstringPhysical column identity, for column-scoped resources. Empty when not applicable.
resource.data_positionstringOpaque KV position, for snapshot resources. Empty when not applicable.
resource.definition_generationintegerPinned definition generation, for definition resources. Absent means zero.
resource.index_idstringPhysical index identity, for index-scoped resources. Empty when not applicable.
resource.kindtable_definition | write_protocol_definition | data_snapshot | transition_deltas | physical_table | physical_column | physical_index | transition_diagnosticsYesThe kind of retained resource.
resource.table_idstringPhysical table identity, for resources scoped to a table. Empty when not applicable.
resource.table_schema_idintegerLogical schema identity of the table. Absent when not applicable.
resource.transition_idstringTransition identity, for transition-scoped resources. Empty when not applicable.
resource.write_protocol_generationintegerPinned write-protocol generation, for write-protocol resources. Absent means zero.

catalog/revision.v1

One immutable logical schema revision. Every published catalog change appends a revision holding the canonical logical schema and its hash, so clients and migrations diff schema history without reading physical state.

FieldTypeRequiredDescription
created_atstringYesRFC 3339 timestamp the revision was published.
hashstringYesCanonical schema hash, sha256: plus the hex digest of the canonical JSON encoding of schema.
schemaobjectYesCanonical logical catalog shape. Physical identities and operational state never appear here, so equal logical schemas hash equally across databases.
schema.tablesarray of objectLogical table definitions in schema-identity order.
schema.tables[].columnsarray of objectLogical column definitions in declaration order.
schema.tables[].columns[].defaultobjectDefault declared for the column.
schema.tables[].columns[].default.boolbooleanLiteral used when the column type is bool.
schema.tables[].columns[].default.float64numberLiteral used when the column type is float64.
schema.tables[].columns[].default.funcuuid | now_msGenerator function for per-row defaults.
schema.tables[].columns[].default.int64integerLiteral used when the column type is int64.
schema.tables[].columns[].default.textstringLiteral used when the column type is text.
schema.tables[].columns[].formatstringAuthored format annotation; not interpreted by storage.
schema.tables[].columns[].idintegerYesLogical schema identity of the column. Never reused.
schema.tables[].columns[].namestringYesColumn name at this revision.
schema.tables[].columns[].nullablebooleanWhether the column accepts null. Absent means false.
schema.tables[].columns[].typetext | int64 | float64 | boolYesScalar type of the column.
schema.tables[].foreign_keysarray of objectLogical foreign-key definitions, sorted canonically.
schema.tables[].foreign_keys[].columnsarray of stringReferencing column names on this table.
schema.tables[].foreign_keys[].namestringYesForeign-key name at this revision.
schema.tables[].foreign_keys[].ref_columnsarray of stringReferenced column names on the target table.
schema.tables[].foreign_keys[].ref_tablestringYesName of the referenced table at this revision.
schema.tables[].idintegerYesLogical schema identity of the table. Never reused.
schema.tables[].indexesarray of objectLogical index definitions, sorted canonically by name, columns, and uniqueness.
schema.tables[].indexes[].columnsarray of stringIndexed column names in index order.
schema.tables[].indexes[].namestringYesIndex name at this revision.
schema.tables[].indexes[].uniquebooleanWhether the index enforces uniqueness. Absent means false.
schema.tables[].namestringYesTable name at this revision.
schema.tables[].primary_keyarray of stringPrimary-key column names in key order.
versionintegerYesCatalog version of this revision. Versions are dense and monotonic; the catalog_meta_schema_version key names the current one.

catalog/table.v1

One physical table: its permanent identities, its columns and their physical representations, and the derived structures writes must maintain. The catalog_table keyspace holds the live record per physical table; the catalog_table_object keyspace holds one immutable copy per definition generation.

FieldTypeRequiredDescription
columnsarray of objectThe table's columns in declaration order.
columns[].formatstringAuthored format annotation, for example uuid. Carried for clients and generators; storage does not interpret it.
columns[].idstringYesPermanent physical column identity, c plus a decimal. Never reused, and the scalar type bound to it never changes in place: row bodies address cells by this identity.
columns[].insert_defaultobjectDefault applied when an insert omits the column.
columns[].insert_default.boolbooleanLiteral used when the column type is bool.
columns[].insert_default.float64numberLiteral used when the column type is float64.
columns[].insert_default.funcuuid | now_msGenerator function. Present when the default is generated per row instead of a literal.
columns[].insert_default.int64integerLiteral used when the column type is int64.
columns[].insert_default.textstringLiteral used when the column type is text.
columns[].missing_valueobjectLiteral supplied for cells absent from stored rows, so column addition never rewrites rows. Absent columns decode as null when no missing value is declared. Generator functions are not permitted here.
columns[].missing_value.boolbooleanLiteral used when the column type is bool.
columns[].missing_value.float64numberLiteral used when the column type is float64.
columns[].missing_value.funcuuid | now_msGenerator function. Never valid for missing values; present in the shape because the default-value form is shared.
columns[].missing_value.int64integerLiteral used when the column type is int64.
columns[].missing_value.textstringLiteral used when the column type is text.
columns[].namestringYesCurrent column name. Mutable, never identity.
columns[].nullablebooleanYesWhether stored cells may be null.
columns[].schema_idintegerYesLogical schema identity of the column. Never reused.
columns[].typetext | int64 | float64 | boolYesScalar type of every stored cell in this column.
columns[].value_generationintegerGeneration checked by the column-value fence. Advancing it invalidates pinned work that assumed the column's stored values kept their meaning. Absent means zero.
constraintsarray of objectDeclared constraints and their validation states.
constraints[].column_idsarray of stringPhysical column identities the constraint covers.
constraints[].definition_generationintegerYesDefinition generation that introduced the constraint.
constraints[].idstringYesPermanent constraint identity, ct plus a decimal. Never reused.
constraints[].kindnot_nullYesConstraint family.
constraints[].namestringYesCurrent constraint name. Mutable, never identity.
constraints[].statedeclared | enforcing_new_writes | validating_existing_data | valid | failed | cancelledYesValidation lifecycle state. valid constraints are enforced and proven; enforcing_new_writes and validating_existing_data constraints reject new violations while existing rows are checked.
definition_generationintegerMonotonic generation of this table's definition. Advances on every published definition change. Absent means zero.
existence_generationintegerGeneration checked by the table-existence fence. Advancing it invalidates pinned work that assumed the table still exists. Absent means zero.
foreign_keysarray of objectForeign keys declared on this table.
foreign_keys[].columnsarray of stringReferencing column names on this table.
foreign_keys[].idstringYesPermanent foreign-key identity, fk plus a decimal. Never reused.
foreign_keys[].namestringYesCurrent foreign-key name. Mutable, never identity.
foreign_keys[].ref_columnsarray of stringReferenced column names on the target table.
foreign_keys[].ref_table_idstringYesPhysical identity of the referenced table.
idstringYesPermanent physical table identity, t plus a decimal from the shared identity counter. Never reused.
indexesarray of objectThe table's secondary indexes.
indexes[].access_generationintegerGeneration checked by the index-access fence. Advancing it invalidates pinned plans that read the index. Absent means zero.
indexes[].column_idsarray of stringPhysical column identities matching columns by position, so renames never break the index definition.
indexes[].columnsarray of stringIndexed column names in index order.
indexes[].definition_generationintegerMonotonic generation of the index definition. Absent means zero.
indexes[].idstringYesPhysical index incarnation, i plus a decimal. Every build allocates a fresh one, so a replacement index is always constructed beside the authoritative one.
indexes[].logical_idstringStable logical index identity, ix plus a decimal. Survives rebuilds; names the index across physical incarnations.
indexes[].namestringYesCurrent index name. Mutable, never identity.
indexes[].state"" | building | catching_up | validating | ready | deleting | failed | cancelledBuild lifecycle state. The empty string and ready are both readable states; every other state belongs to an index under construction or removal.
indexes[].uniquebooleanYesWhether the index enforces uniqueness.
namestringYesCurrent user-visible table name. Mutable, never identity.
primary_keyarray of stringColumn names forming the primary key, in key order. The encoded key tuple is the row's identity inside the data keyspace.
schema_idintegerYesLogical schema identity from the authored schema. Never reused; survives physical replacement of the table.
storage_generationintegerAuthoritative physical storage generation for this table's rows. Data keys embed it between table identity and row identity so a replacement physical representation is built beside the authoritative one and activated with one catalog switch. Absent means generation 1.
write_protocol_generationintegerGeneration of the write protocol this table's writers must follow. Matches the catalog_write_protocol_fence value. Absent means zero.

catalog/transition.v1

One online schema transition and its durable progress state. A transition builds an index, replaces a column, or validates a constraint beside live traffic; every checkpoint persists here so a schema worker resumes after any interruption.

FieldTypeRequiredDescription
affected_column_schema_idsarray of integerLogical column identities the transition changes or proves.
applied_deltaintegerHighest captured-delta sequence applied to the index.
barrier_positionstringOpaque KV position of the validation barrier. Empty until the transition reaches validation.
base_positionstringYesOpaque KV position captured when the transition started. The backfill scans rows at this position; writes after it reach the transition as deltas.
batch_idintegerCount of durable batches the transition has completed.
column_replacementobjectThe resolved source and target columns a column-replacement transition converts between.
column_replacement.conversionstrict_builtinYesDeterministic conversion applied to source cells.
column_replacement.sourceobjectYesThe column being replaced.
column_replacement.source.formatstringAuthored format annotation; not interpreted by storage.
column_replacement.source.idstringYesPermanent physical column identity, c plus a decimal.
column_replacement.source.insert_defaultobjectDefault applied when an insert omits the column.
column_replacement.source.insert_default.boolbooleanLiteral used when the column type is bool.
column_replacement.source.insert_default.float64numberLiteral used when the column type is float64.
column_replacement.source.insert_default.funcuuid | now_msGenerator function for per-row defaults.
column_replacement.source.insert_default.int64integerLiteral used when the column type is int64.
column_replacement.source.insert_default.textstringLiteral used when the column type is text.
column_replacement.source.missing_valueobjectLiteral supplied for cells absent from stored rows.
column_replacement.source.missing_value.boolbooleanLiteral used when the column type is bool.
column_replacement.source.missing_value.float64numberLiteral used when the column type is float64.
column_replacement.source.missing_value.funcuuid | now_msGenerator function. Never valid for missing values; present because the default-value form is shared.
column_replacement.source.missing_value.int64integerLiteral used when the column type is int64.
column_replacement.source.missing_value.textstringLiteral used when the column type is text.
column_replacement.source.namestringYesCurrent column name.
column_replacement.source.nullablebooleanYesWhether stored cells may be null.
column_replacement.source.schema_idintegerYesLogical schema identity of the column.
column_replacement.source.typetext | int64 | float64 | boolYesScalar type of every stored cell.
column_replacement.source.value_generationintegerGeneration checked by the column-value fence. Absent means zero.
column_replacement.targetobjectYesThe replacement column receiving converted cells.
column_replacement.target.formatstringAuthored format annotation; not interpreted by storage.
column_replacement.target.idstringYesPermanent physical column identity, c plus a decimal.
column_replacement.target.insert_defaultobjectDefault applied when an insert omits the column.
column_replacement.target.insert_default.boolbooleanLiteral used when the column type is bool.
column_replacement.target.insert_default.float64numberLiteral used when the column type is float64.
column_replacement.target.insert_default.funcuuid | now_msGenerator function for per-row defaults.
column_replacement.target.insert_default.int64integerLiteral used when the column type is int64.
column_replacement.target.insert_default.textstringLiteral used when the column type is text.
column_replacement.target.missing_valueobjectLiteral supplied for cells absent from stored rows.
column_replacement.target.missing_value.boolbooleanLiteral used when the column type is bool.
column_replacement.target.missing_value.float64numberLiteral used when the column type is float64.
column_replacement.target.missing_value.funcuuid | now_msGenerator function. Never valid for missing values; present because the default-value form is shared.
column_replacement.target.missing_value.int64integerLiteral used when the column type is int64.
column_replacement.target.missing_value.textstringLiteral used when the column type is text.
column_replacement.target.namestringYesCurrent column name.
column_replacement.target.nullablebooleanYesWhether stored cells may be null.
column_replacement.target.schema_idintegerYesLogical schema identity of the column.
column_replacement.target.typetext | int64 | float64 | boolYesScalar type of every stored cell.
column_replacement.target.value_generationintegerGeneration checked by the column-value fence. Absent means zero.
column_replacement_requestobjectThe authored request a column-replacement transition executes.
column_replacement_request.column_schema_idintegerYesLogical identity of the column to replace.
column_replacement_request.conversionstrict_builtinYesDeterministic conversion applied to source cells.
column_replacement_request.defaultobjectDefault declared for the replacement column.
column_replacement_request.default.boolbooleanLiteral used when the column type is bool.
column_replacement_request.default.float64numberLiteral used when the column type is float64.
column_replacement_request.default.funcuuid | now_msGenerator function for per-row defaults.
column_replacement_request.default.int64integerLiteral used when the column type is int64.
column_replacement_request.default.textstringLiteral used when the column type is text.
column_replacement_request.formatstringAuthored format annotation for the replacement column.
column_replacement_request.nullablebooleanYesWhether the replacement column accepts null.
column_replacement_request.typetext | int64 | float64 | boolYesScalar type of the replacement column.
compacted_atstringYesRFC 3339 timestamp of terminal compaction. The zero timestamp means not compacted.
constraintobjectThe constraint a constraint-validation transition proves.
constraint.column_idsarray of stringPhysical column identities the constraint covers.
constraint.definition_generationintegerYesDefinition generation that introduced the constraint.
constraint.idstringYesPermanent constraint identity, ct plus a decimal.
constraint.kindnot_nullYesConstraint family.
constraint.namestringYesCurrent constraint name.
constraint.statedeclared | enforcing_new_writes | validating_existing_data | valid | failed | cancelledYesValidation lifecycle state.
constraint_validation_requestobjectThe authored request a constraint-validation transition executes.
constraint_validation_request.column_schema_idintegerYesLogical identity of the constrained column.
constraint_validation_request.constraint_idstringYesIdentity of the constraint to validate.
created_atstringYesRFC 3339 timestamp of admission.
cursorstringBase64 scan cursor: the last row key the backfill processed. Empty before the first batch.
delta_hard_limitintegerRetained-delta lag at which writers are gated until the transition catches up. Zero means no gate.
delta_high_waterintegerHighest delta sequence captured by writers.
delta_soft_limitintegerRetained-delta lag at which the transition reports degraded work state. Zero means no soft limit.
gate_table_idsarray of stringTables whose schema finalization waits on this transition through their write-protocol finalization gates.
generationintegerYesMonotonic checkpoint counter. Every durable step advances it, so a stale checkpoint can never overwrite a newer one.
idstringYesPermanent transition identity, tr plus a decimal. Never reused.
indexobjectYesThe index under construction. Index-build transitions fill every field; other kinds carry an empty placeholder.
index.access_generationintegerGeneration checked by the index-access fence. Absent means zero.
index.column_idsarray of stringPhysical column identities matching columns by position.
index.columnsarray of stringIndexed column names in index order.
index.definition_generationintegerMonotonic generation of the index definition. Absent means zero.
index.idstringYesPhysical index incarnation, i plus a decimal.
index.logical_idstringStable logical index identity, ix plus a decimal.
index.namestringYesCurrent index name.
index.state"" | building | catching_up | validating | ready | deleting | failed | cancelledBuild lifecycle state of the index itself.
index.uniquebooleanYesWhether the index enforces uniqueness.
index_build_requestobjectThe authored request an index-build transition executes.
index_build_request.column_schema_idsarray of integerLogical column identities to index, in index order.
index_build_request.logical_idstringYesStable logical identity of the new index.
index_build_request.namestringYesRequested index name.
index_build_request.physical_idstringYesPhysical incarnation allocated for the new index.
index_build_request.uniquebooleanYesWhether the new index enforces uniqueness.
kindindex_build | column_replacement | constraint_validationYesThe transition family.
last_errorstringMessage of the most recent failure. Empty when none.
object_idstringLogical identity of the object under construction. Empty for records that identify the object through index.
owner_epochintegerYesEpoch of the schema worker that owns the transition. A claim with a newer epoch fences a stale worker's writes.
prerequisitesarray of stringTransitions that must reach a terminal state first.
rows_scannedintegerCount of rows the backfill has scanned.
source_catalog_versionintegerYesCatalog version the transition was admitted against.
statewaiting | building | catching_up | validating | ready | failed | cancelledYesLifecycle state. ready, failed, and cancelled are terminal; a terminal transition is compacted and later reclaimed.
table_idstringYesPhysical identity of the table the transition works on.
table_schema_idintegerYesLogical schema identity of that table.
updated_atstringYesRFC 3339 timestamp of the most recent checkpoint.
work_state"" | normal | degraded | write_gatedBackpressure classification derived from delta lag. The empty string means unclassified.

catalog/unique_claim.v1

One uniqueness claim over an indexed tuple, recorded while a unique index builds. Two claims on one tuple from different rows are a violation the build surfaces before the index can publish.

FieldTypeRequiredDescription
pkstringYesBase64 primary-key tuple bytes of the claiming row.
tuplestringYesBase64 indexed tuple bytes the claim covers.

catalog/write_protocol.v1

The write obligations for one table at one generation: the indexes every write maintains, the delta sinks capturing writes for indexes under construction, the dual-writes for column replacements, and the constraint checks applied to new writes. Definitions are immutable per generation; the catalog_write_protocol_fence keyspace names the current generation.

FieldTypeRequiredDescription
column_replacementsarray of objectOnline column retypings in progress. Writes store both the source and the converted target cell.
column_replacements[].replacementobjectYesThe source column, target column, and conversion.
column_replacements[].replacement.conversionstrict_builtinYesDeterministic conversion applied to source cells.
column_replacements[].replacement.sourceobjectYesThe column being replaced.
column_replacements[].replacement.source.formatstringAuthored format annotation; not interpreted by storage.
column_replacements[].replacement.source.idstringYesPermanent physical column identity, c plus a decimal.
column_replacements[].replacement.source.insert_defaultobjectDefault applied when an insert omits the column.
column_replacements[].replacement.source.insert_default.boolbooleanLiteral used when the column type is bool.
column_replacements[].replacement.source.insert_default.float64numberLiteral used when the column type is float64.
column_replacements[].replacement.source.insert_default.funcuuid | now_msGenerator function for per-row defaults.
column_replacements[].replacement.source.insert_default.int64integerLiteral used when the column type is int64.
column_replacements[].replacement.source.insert_default.textstringLiteral used when the column type is text.
column_replacements[].replacement.source.missing_valueobjectLiteral supplied for cells absent from stored rows.
column_replacements[].replacement.source.missing_value.boolbooleanLiteral used when the column type is bool.
column_replacements[].replacement.source.missing_value.float64numberLiteral used when the column type is float64.
column_replacements[].replacement.source.missing_value.funcuuid | now_msGenerator function. Never valid for missing values; present because the default-value form is shared.
column_replacements[].replacement.source.missing_value.int64integerLiteral used when the column type is int64.
column_replacements[].replacement.source.missing_value.textstringLiteral used when the column type is text.
column_replacements[].replacement.source.namestringYesCurrent column name.
column_replacements[].replacement.source.nullablebooleanYesWhether stored cells may be null.
column_replacements[].replacement.source.schema_idintegerYesLogical schema identity of the column.
column_replacements[].replacement.source.typetext | int64 | float64 | boolYesScalar type of every stored cell.
column_replacements[].replacement.source.value_generationintegerGeneration checked by the column-value fence. Absent means zero.
column_replacements[].replacement.targetobjectYesThe replacement column receiving converted cells.
column_replacements[].replacement.target.formatstringAuthored format annotation; not interpreted by storage.
column_replacements[].replacement.target.idstringYesPermanent physical column identity, c plus a decimal.
column_replacements[].replacement.target.insert_defaultobjectDefault applied when an insert omits the column.
column_replacements[].replacement.target.insert_default.boolbooleanLiteral used when the column type is bool.
column_replacements[].replacement.target.insert_default.float64numberLiteral used when the column type is float64.
column_replacements[].replacement.target.insert_default.funcuuid | now_msGenerator function for per-row defaults.
column_replacements[].replacement.target.insert_default.int64integerLiteral used when the column type is int64.
column_replacements[].replacement.target.insert_default.textstringLiteral used when the column type is text.
column_replacements[].replacement.target.missing_valueobjectLiteral supplied for cells absent from stored rows.
column_replacements[].replacement.target.missing_value.boolbooleanLiteral used when the column type is bool.
column_replacements[].replacement.target.missing_value.float64numberLiteral used when the column type is float64.
column_replacements[].replacement.target.missing_value.funcuuid | now_msGenerator function. Never valid for missing values; present because the default-value form is shared.
column_replacements[].replacement.target.missing_value.int64integerLiteral used when the column type is int64.
column_replacements[].replacement.target.missing_value.textstringLiteral used when the column type is text.
column_replacements[].replacement.target.namestringYesCurrent column name.
column_replacements[].replacement.target.nullablebooleanYesWhether stored cells may be null.
column_replacements[].replacement.target.schema_idintegerYesLogical schema identity of the column.
column_replacements[].replacement.target.typetext | int64 | float64 | boolYesScalar type of every stored cell.
column_replacements[].replacement.target.value_generationintegerGeneration checked by the column-value fence. Absent means zero.
column_replacements[].transition_idstringYesThe column-replacement transition backfilling the target.
constraint_checksarray of objectConstraints enforced on new writes while existing data validates.
constraint_checks[].constraintobjectYesThe constraint to enforce on new writes.
constraint_checks[].constraint.column_idsarray of stringPhysical column identities the constraint covers.
constraint_checks[].constraint.definition_generationintegerYesDefinition generation that introduced the constraint.
constraint_checks[].constraint.idstringYesPermanent constraint identity, ct plus a decimal.
constraint_checks[].constraint.kindnot_nullYesConstraint family.
constraint_checks[].constraint.namestringYesCurrent constraint name.
constraint_checks[].constraint.statedeclared | enforcing_new_writes | validating_existing_data | valid | failed | cancelledYesValidation lifecycle state.
constraint_checks[].transition_idstringYesThe constraint-validation transition proving existing data.
delta_sinksarray of objectIndexes under construction. Writes are captured as ordered deltas in the catalog_transition_delta keyspace and applied by the build.
delta_sinks[].columnsarray of stringColumn names the sink indexes, resolved when the protocol was published, so renames never change what writers capture.
delta_sinks[].delta_hard_limitintegerRetained-delta lag at which writes are gated until the build catches up. Zero or absent means no gate.
delta_sinks[].indexobjectYesThe index under construction.
delta_sinks[].index.access_generationintegerGeneration checked by the index-access fence. Absent means zero.
delta_sinks[].index.column_idsarray of stringPhysical column identities matching columns by position.
delta_sinks[].index.columnsarray of stringIndexed column names in index order.
delta_sinks[].index.definition_generationintegerMonotonic generation of the index definition. Absent means zero.
delta_sinks[].index.idstringYesPhysical index incarnation, i plus a decimal.
delta_sinks[].index.logical_idstringStable logical index identity, ix plus a decimal.
delta_sinks[].index.namestringYesCurrent index name.
delta_sinks[].index.state"" | building | catching_up | validating | ready | deleting | failed | cancelledBuild lifecycle state.
delta_sinks[].index.uniquebooleanYesWhether the index enforces uniqueness.
delta_sinks[].transition_idstringYesThe index-build transition consuming the deltas.
finalization_gateobjectBlocks schema finalization for this table until the named transition reaches a terminal state.
finalization_gate.kindindex_build | column_replacement | constraint_validationYesThe transition family holding the gate.
finalization_gate.object_idstringYesLogical identity of the object the transition builds.
finalization_gate.transition_idstringYesThe transition that must finish first.
generationintegerYesWrite-protocol generation. Writers admit their cached protocol against the fence before every write, so a published change fences stale writers.
ready_indexesarray of objectIndexes every write must maintain directly.
ready_indexes[].access_generationintegerGeneration checked by the index-access fence. Absent means zero.
ready_indexes[].column_idsarray of stringPhysical column identities matching columns by position.
ready_indexes[].columnsarray of stringIndexed column names in index order.
ready_indexes[].definition_generationintegerMonotonic generation of the index definition. Absent means zero.
ready_indexes[].idstringYesPhysical index incarnation, i plus a decimal.
ready_indexes[].logical_idstringStable logical index identity, ix plus a decimal.
ready_indexes[].namestringYesCurrent index name.
ready_indexes[].state"" | building | catching_up | validating | ready | deleting | failed | cancelledBuild lifecycle state. The empty string and ready are both readable states.
ready_indexes[].uniquebooleanYesWhether the index enforces uniqueness.
table_idstringYesPhysical identity of the table this protocol governs.

metadata/compatibility.v1

What this database requires of binaries that open it. The manifest is separate from the specification revision: it carries capability floors and enabled storage features, validated before a process serves requests. A binary must read the existing storage world before it may enable or write a new storage feature.

FieldTypeRequiredDescription
featuresarray of stringStorage features enabled in this database. A binary that does not know a listed feature fails closed at startup.
min_readerintegerYesLowest storage capability a binary needs to read this database. A process whose capability is lower fails closed at startup.
min_writerintegerYesLowest storage capability a binary needs to write this database. Read-only processes ignore this floor.