Use database page size in read replication

This commit is contained in:
Ben Johnson
2022-04-02 11:43:49 -06:00
parent 00bad4308d
commit 8d10881278
4 changed files with 140 additions and 115 deletions

2
db.go
View File

@@ -677,8 +677,6 @@ func (db *DB) initReplica(pageSize int) (err error) {
return fmt.Errorf("enable wal failed, mode=%q", mode)
}
// TODO: Set page size.
if _, err := db.db.ExecContext(db.ctx, `CREATE TABLE IF NOT EXISTS _litestream (id INTEGER)`); err != nil {
return fmt.Errorf("create _litestream table: %w", err)
} else if _, err := db.db.ExecContext(db.ctx, `PRAGMA wal_checkpoint(TRUNCATE)`); err != nil {