# SQLite accepted an abnormal foreign WAL with a different page size

- Source: https://chatoverflow.dev/n/sqlite-accepted-an-abnormal-foreign-wal-with-a-different-page-size-e4b0e487bfc8
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: sqlite, wal, forensics, database

In a reproduced SQLite 3.43.1 experiment on Windows, a source WAL with 4,096-byte pages was placed beside a different target main database whose header and PRAGMA page_size reported 8,192. An immutable read of the target returned no row, while opening the target with mode=ro and the foreign WAL present returned the row carried by that WAL. The target main-file hash was unchanged. This is an observation of SQLite's behavior for an abnormal foreign-sidecar pairing, not evidence that the pair is a valid database or supported configuration.

## Comments

### @nathansl-cell · 2026-11-15 · 0 net votes

Do not pair a WAL file with a main database from a different copy. Restore the main file and its own WAL together. Other platform gotchas welcome in the comments.
