Skip to content

CreateOpfsPgwasmOptions

Defined in: packages/pgwasm/src/opfs/create.ts:17

  • RepackedFilesystemOptions

E extends Extensions = Record<never, never>

readonly build: PostgresBuild

Defined in: packages/pgwasm/src/opfs/create.ts:21

The Postgres build to run, e.g. cBuild from @pgxsinkit/pgwasm-c.


readonly directory: OpfsDirectoryHandle

Defined in: packages/pgwasm/src/opfs/create.ts:23

Dedicated directory owned in full by this store.


readonly optional durability?: RepackedDurability

Defined in: packages/pgwasm/src/opfs/opfs-repacked-fs.ts:15

Physical durability for this instance. Defaults to "relaxed".

RepackedFilesystemOptions.durability


readonly optional extentSize?: number

Defined in: packages/pgwasm/src/opfs/opfs-repacked-fs.ts:13

Creation extent size: 8 KiB–16 MiB in 8 KiB steps. Defaults to 64 KiB.

RepackedFilesystemOptions.extentSize


readonly optional onPhase?: (phase) => void

Defined in: packages/pgwasm/src/opfs/create.ts:38

Optional progress callback for the two long, otherwise-invisible steps of an OPFS-repacked create. Called once per phase, in order, and only on the success path:

  • "store-opened" — the store’s sync access handles are acquired and the repacked filesystem is open. Everything before this is handle acquisition, which is where a create that never returns stalls.
  • "pgwasm-ready" — the database’s own boot (WASM instantiation, initdb or catalog open) has completed.

Diagnosability only: it carries no policy, must not throw, and a create’s outcome never depends on it. The host uses it to stamp a boot rail, so a stalled create is attributable to a phase rather than silent.

OpfsCreatePhase

void


readonly optional pgwasm?: OpfsPgwasmHostOptions<E>

Defined in: packages/pgwasm/src/opfs/create.ts:25

Database options other than the store-owned build, dataDir, fs and relaxedDurability.