ouroboros-consensus
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Storage.LeiosDB.Impl.SQLite.Schema

Description

The schema of the LeiosDB partition files.

The immutable partition holds a subset of the volatile one: the same tables with fewer ebs columns, and none of the volatile-only tables and indexes.

Every statement is IF NOT EXISTS, so the schemas are idempotent: initialiseLeiosDbFiles applies them on every handle creation.

Synopsis

Documentation

sql_schema_vol ∷ String Source #

Schema of the volatile partition (leios.vol.db): sql_schema_imm with the columns and objects that track completeness and GC.

sql_schema_imm ∷ String Source #

Schema of the immutable partition (leios.imm.db): the subset of sql_schema_vol that the copier writes and the fallback reads use. The tables it keeps have the volatile columns, so the fallback reads reuse the volatile SQL verbatim and the copy is a server-side INSERT ... SELECT over ATTACH.

Left out, since EBs land here complete and are never collected: ebs.missingTxCount, ebs.status, ebsMissingTxs, the GC tables and indexes, and idx_ebTxs_txHashBytes. Files created before the split still have some of them; nothing reads them.