Files
sqlite3/litestream/README.md
2025-11-27 17:29:47 +00:00

1.1 KiB

Litestream in-process replication and lightweight read-replicas

This package adds EXPERIMENTAL support for in-process Litestream.

Lightweight read-replicas

The "litestream" SQLite VFS implements Litestream lightweight read-replicas.

See the example for how to use.

To improve performance, increase PollInterval as much as you can, and set PRAGMA cache_size=N (or use _pragma=cache_size(N)).

In-process replication

For disaster recovery, it is probably best if you run Litestream as a separate background process, as recommended by the tutorial.

However, running Litestream as a background process requires compatible locking and cross-process shared memory WAL (see our support matrix).

If your OS lacks locking or shared memory support, you can use NewPrimary with the sqlite3_dotlk build tag to setup in-process replication.