Skip to content

chore: PRAGMA synchronous is unimplemented, silently ignored #645

Description

@iheitlager

Description

src/vdbe/pragma.rs has no handling for PRAGMA synchronous — it's silently ignored rather than rejected or acted upon, so every commit unconditionally does full fsyncs (matching only SQLite's synchronous=FULL default) and there is no way to opt into NORMAL/OFF semantics. This is a parity gap against real SQLite, not the cause of the current benchmark's 10x gap (both benchmark sides use library defaults, so it's apples-to-apples) — filed separately as lower priority.

Complexity

Estimate: medium
Reasoning: Requires deciding how synchronous interacts with the existing rollback-journal/WAL fsync call sites (src/pager.rs:589,597,697) — not just a parse-and-store no-op, since it should actually change fsync behavior for NORMAL/OFF to be meaningful, which touches pager commit logic and needs spec/ADR consideration for durability semantics.

Context

Surfaced during the same 4-agent investigation as the DDL-reparse and tokenizer tickets, but is an independent parity gap rather than a perf-bug contributor.

Acceptance Criteria

  • PRAGMA synchronous is recognized and stored per-connection
  • FULL/NORMAL/OFF map to the correct fsync call pattern in the pager
  • Oracle-parity test confirms PRAGMA synchronous round-trips (PRAGMA synchronous query returns the set value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions