---
title: Migrating from Postgres to SQLite with Kent C. Dodds
url: "https://aaronfrancis.com/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds"
path: "/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds"
type: video
author: Aaron Francis
published: 2024-06-20
topic: Databases
keywords: [sqlite, litefs, postgres migration, kent c dodds, fly.io, epic stack, database replication, global performance, sticky sessions, write requests, high-water marks, litestream]
youtube_url: "https://www.youtube.com/watch?v=KYDlqTdJmac"
chunked: true
full_bytes: 73943
section_count: 14
full_url: "/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/full.md"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# Migrating from Postgres to SQLite with Kent C. Dodds

## Sections (72.2 KB full document — follow any link to read verbatim)

This page is long enough to hit agent truncation cliffs if fetched all at once. Pick the section matching your question below to read it 100% verbatim (< 35 KB each), or open the [full unsplit document (72.2 KB)](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/full.md).

### 1. Introduction to Database School (00:00–00:42 · 0.9 KB)
Aaron launches Database School as the fourth episode and first with a name, explaining the podcast grew from YouTube interviews with SQLite experts.
Keywords: `database school`, `database`, `school`, `introduction`, `kent c`, `sqlite`, `dodds`, `kent`
[Read section 1 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/1-introduction-to-database-school.md)

### 2. Introducing Kent C. Dodds (00:42–01:21 · 0.8 KB)
Aaron introduces Kent C. Dodds as a prolific React creator behind Epic Web and Epic Stack, with Kent reciprocating admiration for Aaron's database expertise and Laravel experience.
Keywords: `dodds`, `introducing kent`, `kent c`, `kent`, `epic`, `anything`
[Read section 2 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/2-introducing-kent-c-dodds.md)

### 3. Kent's Background and Experience (01:21–02:25 · 1.3 KB)
Kent shares he graduated from Brigham Young University in 2014, has worked exclusively in JavaScript, progressed from Backbone to Angular to React, and now does full-stack development with Next.js.
Keywords: `kent background`, `background`, `kent`, `experience`, `full stack`, `dodds`, `stack`, `javascript`
[Read section 3 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/3-kents-background-and-experience.md)

### 4. Family Life and Work Balance (02:25–03:52 · 1.7 KB)
Kent discusses his five children including a 7-month-old born in November and an 11-year-old daughter entering preteen years, while Aaron shares he has 3-year-old twins.
Keywords: `work balance`, `family life`, `family`, `balance`, `dodds`, `sqlite`, `litefs`, `oldest`
[Read section 4 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/4-family-life-and-work-balance.md)

### 5. The Reason for the Interview: Migrating from Postgres to SQLite (03:52–06:04 · 2.2 KB)
Aaron explains he read Kent's blog post about migrating from Postgres to SQLite with LiteFS and wanted to discuss the journey from an application developer's perspective, noting Kent connected with Fly CEO Kurt and LiteFS creator Ben Johnson.
Keywords: `sqlite`, `paypal`, `postgres`, `dodds`, `left paypal`, `litefs`, `application`, `full-time`
[Read section 5 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/5-the-reason-for-the-interview-migrating-from-pos.md)

### 6. Challenges with Postgres and Redis on Fly.io (06:04–07:42 · 2.1 KB)
Kent recounts building his website on Fly.io with multi-regional Postgres and Redis clusters across six regions for global performance, but struggled with operational complexity and lacked expertise to debug infrastructure issues.
Keywords: `postgres`, `redis`, `fly`, `challenges`, `fly.io`, `dodds`, `mm-hmm`, `go`
[Read section 6 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/6-challenges-with-postgres-and-redis-on-flyio.md)

### 7. Choosing SQLite and LightFS for Simplicity (07:42–24:04 · 21.3 KB)
Kent discovered SQLite could meet his distributed database requirements using LiteFS, which provides read replicas across regions while maintaining a single primary region for writes, drastically simplifying his infrastructure.
Keywords: `litefs`, `sqlite`, `github`, `rocket rental`, `choosing sqlite`, `dodds`, `choosing`, `simplicity`
[Read section 7 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/7-choosing-sqlite-and-lightfs-for-simplicity.md)

### 8. Implementing LightFS on Fly.io (24:04–31:17 · 8.8 KB)
LiteFS enables read replicas worldwide with a single primary region for writes; Kent migrated via SFTP using a custom script to dump PostgreSQL data, used Prisma ORM to minimize code changes, and relies on Fly's Console service for primary election and synchronization.
Keywords: `litefs`, `sqlite`, `fly`, `implementing lightfs`, `dodds`, `file system`, `mm-hmm`, `fly.io`
[Read section 8 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/8-implementing-lightfs-on-flyio.md)

### 9. The Role of Console in Managing Primary Instances (31:17–40:04 · 11.3 KB)
Console is a background service managing primary instance election and replication; Kent configured LiteFS YAML with static lease to ensure the primary stays in his chosen region (like DFW), and deployed two instances in that region for redundancy.
Keywords: `litefs`, `managing primary`, `instances`, `sqlite`, `console`, `primary instances`, `postgres`, `role`
[Read section 9 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/9-the-role-of-console-in-managing-primary-instance.md)

### 10. Handling Write Requests Across Multiple Regions (40:04–42:55 · 3.8 KB)
Kent discovered that requests hitting read-only replicas before writes replicate creates eventual consistency issues; LiteFS's Fly Replay header lets read replicas redirect writes to the primary region for processing, though replication latency can expose stale data.
Keywords: `write requests`, `multiple regions`, `regions`, `requests`, `multiple`, `dodds`, `mm-hmm`, `dfw`
[Read section 10 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/10-handling-write-requests-across-multiple-regions.md)

### 11. Sticky Sessions and High-Water Marks Strategy (42:55–48:33 · 7.8 KB)
Kent coined "at scale, edge cases become common" and built a library setting cookies on write responses with SQLite transaction IDs to ensure users read their own writes, which Ben Johnson integrated directly into LiteFS as a built-in proxy feature.
Keywords: `marks strategy`, `sticky sessions`, `sticky`, `sessions`, `high-water marks`, `strategy`, `sqlite`, `high-water`
[Read section 11 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/11-sticky-sessions-and-high-water-marks-strategy.md)

### 12. LightFS Built-In Features and Kent's Contributions (48:33–50:26 · 2.6 KB)
LiteFS's proxy now automatically handles sticky sessions and request replaying; most developers need not worry except when mutating on GET requests (like tracking activity or cache revalidation), which Kent plans to extract into a library.
Keywords: `epic stack`, `litefs`, `lightfs built-in`, `built-in features`, `kent contributions`, `built-in`, `features`, `kent`
[Read section 12 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/12-lightfs-built-in-features-and-kents-contributio.md)

### 13. Discussion on the Epic Stack (50:27–56:57 · 7.9 KB)
Kent's Epic Stack is a full-stack framework/meta-framework; Epic Web at epicweb.dev provides premium documentation with workshops on authentication, database optimization, and deploying SQLite globally across multiple regions.
Keywords: `epic stack`, `epic web`, `epic`, `stack`, `javascript`, `github`, `sqlite`, `discussion`
[Read section 13 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/13-discussion-on-the-epic-stack.md)

### 14. Conclusion and Final Thoughts (56:59–57:00 · 0.1 KB)
Aaron and Kent exchange thanks for their contributions to web education and infrastructure, with Kent reachable at kentcdodds everywhere on social media and kentcdodds.com for his website.
Keywords: `final thoughts`, `conclusion`, `thoughts`
[Read section 14 verbatim](/videos/migrating-from-postgres-to-sqlite-with-kent-c-dodds/sections/14-conclusion-and-final-thoughts.md)

---

## Related on aaronfrancis.com

- [Distributed SQLite with Litestream and LiteFS](/videos/distributed-sqlite-with-litestream-and-litefs) *(Video · 2024-05-30 · shared: litestream, litefs, sqlite)*
- [Remix with Kent C. Dodds](/podcast/remix-with-kent-c-dodds-528af99d) *(Podcast · 2022-06-27 · shared: kent c dodds, fly.io, sqlite)*
- [Building a serverless database replica with Carl Sverre](/videos/building-a-serverless-database-replica-with-carl-sverre) *(Video · 2025-04-18 · shared: sqlite, database replication, fly.io)*
- [The Big Reveal](/podcast/the-big-reveal-675733cf) *(Podcast · 2025-01-28 · shared: sqlite, kent c dodds)*
- [How to Make $2,000,000 From Courses and Quit Your 9-To-5](/podcast/how-to-make-2000000-from-courses-and-quit-your-9-to-5-ae0d80a8) *(Podcast · 2024-09-05 · shared: sqlite, kent c dodds)*

## Relevant Resources from Aaron Francis

- **[High Performance SQLite](https://databaseschool.com)** (overview on site: [/courses](/courses)): Comprehensive video course on running SQLite in production: WAL mode, concurrency, FTS5, strict tables, backups, and performance tuning.
- **[MySQL for Developers](https://databaseschool.com)** (overview on site: [/courses](/courses)): Full video course covering MySQL indexing, deferred joins, pagination, query plans, and schema design for application developers.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `sqlite` ([S](/llms/keywords/s.txt)), `litefs` ([K-L](/llms/keywords/k-l.txt)), `postgres migration` ([O-P](/llms/keywords/o-p.txt)), `fly.io` ([F-G](/llms/keywords/f-g.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
