AL+

Language: RO (română) EN (English)

Email us: paul@alplustech.com

SQLite SAHPool compatibility needs a browser-storage rollback plan

SQLite 3.50 changed SAHPool filename handling. Plan older-client access and recoverable storage separately from SQLite's database file-format compatibility.

Citiți articolul în română

A browser application can keep using SQLite's database format and still make its stored data unreadable to an older application client. SQLite 3.50.0's SAHPool change is a concrete example. The operational question is which client versions can discover and open browser storage after the upgrade, including after a rollback.

Looking back from November 2026 at the May release, the useful maintenance lesson is to treat browser storage metadata as part of the deployment contract. Database-engine compatibility alone cannot establish that contract. A team needs to identify the storage adapter, preserve recoverable data and check the older-client path before promising a reversible release.

The 29 May 2025 release notes identify a filename-digest bug fix in the OPFS SAHPool virtual file system. They explicitly say that databases created there by 3.50.0 or later cannot be read by older versions of that VFS, while 3.50.0 can work with databases created by older versions. That is a directional compatibility statement with a specific scope.

Follow the layers between a record and storage

An application issues database operations through a binding and a storage implementation. In a browser, persistent storage also depends on the browser's facilities and the adapter's way of associating logical filenames with stored objects. A valid SQLite database does not, by itself, prove that every adapter version will locate and interpret those objects in the same way.

SQLite's browser-persistence documentation describes SAHPool as one of several persistence choices. It is living documentation consulted for this retrospective, rather than a frozen description of every release. Use it to understand the architecture, and use the dated release note to establish the historical compatibility change.

That separation prevents an expensive misdiagnosis. A client failing to reopen storage after a rollback does not immediately prove that SQLite changed its database file format or that the application needs a server database. First identify the layer whose assumptions changed. Replacing a database engine would be a much wider decision than resolving adapter-version compatibility.

Nor does this warning apply automatically to every browser SQLite application. An application using another VFS has a different storage path. A native installation has another environment again. Inventory the actual deployed package and VFS rather than infer exposure from the word SQLite in a dependency list.

A code rollback can leave new data behind

The risky assumption is that returning to an earlier JavaScript bundle returns the whole application to its earlier state. Persistent browser data survives the replacement of code. If a newer client creates data that the older VFS cannot read, selecting the previous bundle alone does not restore older-client readability.

Several delivery mechanisms can make client versions coexist: an old tab, a cached asset or a user returning after a long interval. These are possible deployment conditions to investigate, not a claim that every installation encounters them. The team should establish which versions can actually operate on the same storage in its application.

The direction matters. Evidence that a newer client opens an older database does not answer whether an older client can open newly created storage. Keep those checks separate. A release check that exercises only the forward path can look reassuring while leaving the rollback path unexamined.

Avoid broadening the release note into an unsupported claim that every old database is immediately rewritten into an unreadable form on first access. The note's explicit warning concerns databases created by the newer VFS. Any stronger claim about existing-data conversion needs evidence from the exact adapter behavior and version involved.

Preserve data in a form you can restore

Before a consequential storage change, define what the backup contains and which application version can restore it. A copy of storage objects and a logical database export may serve different recovery purposes. The correct choice depends on the adapter's supported interfaces and the application's consistency requirements.

A backup is useful only if its restore path is understood. The proposed check should use disposable representative data, preserve the required related state and reopen the restored result with the intended client. Merely seeing a file in an export directory does not demonstrate recovery. This article reports no backup experiment or browser test.

Also distinguish restoring earlier data from preserving work created after an upgrade. Returning to a pre-upgrade backup can discard later edits. If rollback is part of the release promise, describe how those edits will be handled or make the possible loss explicit before users depend on the new version.

Do not make deletion of browser storage the default repair. That may remove the user's only copy. A recovery design should first establish what can be exported, synchronized or retained. Clearing storage is a destructive application decision, not a neutral response to a compatibility warning.

Single-version deployments have a narrower problem

The strongest counterargument is operational simplicity. A controlled installation that runs one enforced client version and never returns to an older bundle has less exposure to older-client readability. It may reasonably avoid the machinery needed for a long mixed-version transition.

That argument is sound when its assumptions are enforceable. Check what happens to offline clients and whether a rollback would reintroduce an older reader. Even a single-version deployment still needs recovery from data loss or a failed release. Reduced coexistence risk does not establish that its backup works.

For software maintenance, request a small compatibility matrix tied to the actual VFS and client versions. Include old data with the new reader, newly created data with the rollback reader, and the supported restore procedure. The decision then concerns a specific browser-storage transition, with evidence proportionate to its risk, rather than a general debate about replacing SQLite.