Skip to content

DataExportReport

Defined in: packages/client/src/export-store.ts:129

A data export (ADR-0035 decision 1, via the throwaway clone of the addendum): the PORTABLE artefact — the synced tables and the enum types they depend on, schema + data, nothing of pgxsinkit’s machinery, loadable into a vanilla Postgres. It is a generated enum DDL header concatenated ahead of a pg_dump -t (per synced table) --no-owner run against the same memory-backed throwaway clone the diagnostic dump uses. Unlike the other two exports it GUARDS: it requires a drained Mutation journal (or the explicit drainJournal: false escape hatch), so its phases add the drain wall ahead of the clone pipeline, and it records its provenance (tables = the -t allowlist actually applied, escapeHatch = whether the drain was skipped).

byteLength: number

Defined in: packages/client/src/export-store.ts:54

The artefact’s byte length — the size the caller downloads / persists.

ExportReportCommon.byteLength


diagnostics: MutationDiagnostics

Defined in: packages/client/src/export-store.ts:60

The MutationDiagnostics snapshot at export time — the journal state captured alongside the artefact (for the store backup, the very journal that travels INSIDE the tarball; for the diagnostic dump, the live store’s journal at dump time, whose rows the SQL also carries).

ExportReportCommon.diagnostics


escapeHatch: boolean

Defined in: packages/client/src/export-store.ts:143

true when drainJournal: false skipped the drain and the artefact reflects the SYNCED state as-is (unflushed local writes silently absent). false on the strict path (a drained or empty journal).


kind: "data-export"

Defined in: packages/client/src/export-store.ts:130


phases: object

Defined in: packages/client/src/export-store.ts:144

checkpointMs: number

CHECKPOINT wall — flushing dirty buffers before the internal datadir dump the clone consumes.

checkpointStartedAtMs: number

Offset from export start when the CHECKPOINT began.

cloneBootMs: number

Clone boot wall — booting the memory-backed throwaway from the internal dump.

cloneBootStartedAtMs: number

Offset from export start when the throwaway clone’s PGlite.create({ loadDataDir }) began.

drainMs: number

Drain wall — flushing + awaiting the journal reach fully-drained (0 under the escape hatch).

drainStartedAtMs: number

Offset from export start when the drain guard began (0 when the escape hatch skipped it).

dumpMs: number

dumpDataDir wall — the uncompressed internal tarball the throwaway clone boots from (compression: "none").

dumpStartedAtMs: number

Offset from export start when the internal dumpDataDir began.

pgDumpMs: number

pg_dump -t wall — the WASM pg_dump reading the allowlisted tables out to SQL.

pgDumpStartedAtMs: number

Offset from export start when pg_dump -t began running against the clone.


reportVersion: 1

Defined in: packages/client/src/export-store.ts:48

ExportReportCommon.reportVersion


scope: "synced-tables"

Defined in: packages/client/src/export-store.ts:132

A data export covers the synced tables + their enum types only — never pgxsinkit’s overlay/journal/metadata.


startedAt: number

Defined in: packages/client/src/export-store.ts:50

Epoch anchor (Date.now()) at export start; every other duration/offset is monotonic relative to it.

ExportReportCommon.startedAt


tables: string[]

Defined in: packages/client/src/export-store.ts:138

The schema-qualified physical synced tables the -t allowlist targeted, in registry order — the self-describing provenance of exactly what the artefact carries (ephemeral/read-projection entries excluded by construction). May be empty when the registry declares no owning persistent table.


totalMs: number

Defined in: packages/client/src/export-store.ts:52

Export start → artefact ready.

ExportReportCommon.totalMs