# pgtestdb's Template Cloning Approach to Testing is Fast

> Hacker News story 49111687 · language: en · submitted 2026-07-30
> Web version: https://zeli.app/story/49111687
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 19 · by [peterldowns](<https://news.ycombinator.com/user?id=peterldowns>) · 💬 2
[original](<https://brandur.org/fragments/pgtestdb>) · [HN discussion](<https://news.ycombinator.com/item?id=49111687>)

## Summary

I explored Peter Downs' pgtestdb, a Go/Postgres testing package leveraging template databases for rapid setup. While cloning databases proved surprisingly fast at roughly 100ms, my River project's schema-based method with reuse optimization remains significantly quicker overall. I recommend pgtestdb for end-to-end testing scenarios, though schema pooling offers superior performance for large test suites.

## Key quote

> 100 ms to bootstrap a test database is pretty fast, but if you're building a full application that's going to have 10,000 tests, ideally you want a test setup on the order of 10x faster.

---

## Cite

- Page: https://zeli.app/story/49111687
- Date: 2026-07-30
- Source: brandur.org (https://brandur.org/fragments/pgtestdb)
- Hacker News: https://news.ycombinator.com/item?id=49111687
