Skip to content

Commit ea42b42

Browse files
committed
chore: dev-only postgres tuning in docker-compose for faster local backfills
1 parent 53f9303 commit ea42b42

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

docker-compose.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,26 @@ services:
88
POSTGRES_PASSWORD: postgres
99
ports:
1010
- "${DB_PORT}:5432"
11-
# command: ["postgres", "-c", "log_statement=all"]
12-
shm_size: 1gb
11+
# DEV-ONLY tuning — fsync=off + full_page_writes=off mean a crash
12+
# corrupts the DB. Fine for `pnpm run setup` workflow; never for prod.
13+
command:
14+
- postgres
15+
- -c
16+
- synchronous_commit=off
17+
- -c
18+
- fsync=off
19+
- -c
20+
- full_page_writes=off
21+
- -c
22+
- shared_buffers=2GB
23+
- -c
24+
- work_mem=64MB
25+
- -c
26+
- maintenance_work_mem=512MB
27+
- -c
28+
- wal_buffers=64MB
29+
- -c
30+
- checkpoint_timeout=30min
31+
- -c
32+
- max_wal_size=8GB
33+
shm_size: 2gb

0 commit comments

Comments
 (0)