peterldowns/pgtestdb
View on GitHub ↗ ★ 514 Go
quickly run tests in their own temporary, isolated, postgres databases
13 mentions on Hacker News by 4 people: 1 story, 12 comments · first 2023-06-04 · latest 2026-08-01
20082026
-
Peter actually makes this exact point in the project's README. See this section here: https://github.com/peterldowns/pgtestdb#how-do-i-make-it-go-... I'd just say that a nice thing about it on disk (even if you disable fsync) is that in…
comment by brandur · 2026-08-01 · in Pgtestdb's template cloning approach to testing is fast -
…general; I've used Neon to do it for "live" integration environments, and I have a golang project https://github.com/peterldowns/pgtestdb that uses templates to give you ~unit-test-speed integration tests that each get their own…
comment by peterldowns · 2025-12-23 · in Instant database clones with PostgreSQL 18 -
That's not always true — database-backed tests can be extremely fast, see https://github.com/peterldowns/pgtestdb .
comment by peterldowns · 2024-12-31 · in Database mocks are not worth it -
Here's what I've found — https://github.com/peterldowns/pgtestdb#how-do-i-make-it-go-... If you come up with any better options please let me know so I can update this readme!
comment by peterldowns · 2024-12-31 · in Database mocks are not worth it -
…databases by cloning from one that's already set up with all the schemas correctly migrated. https://github.com/peterldowns/pgtestdb
comment by peterldowns · 2024-12-31 · in Database mocks are not worth it -
Don't know what language or database you use, but check this out: https://github.com/peterldowns/pgtestdb If you happen to use Postgres, the approach is ultimately portable: it uses Pg database templates (also, regarding perf, the author…
comment by avg_dev · 2024-12-30 · in Database mocks are not worth it -
…probably also just run a postgres binary and store the data on a memory-backed filesystem. [0] https://github.com/peterldowns/pgtestdb
comment by peter_l_downs · 2024-04-08 · in Show HN: I open-sourced the in-memory PostgreSQL I built at work for E2E tests -
…and whether or not you clearly understand what these libraries are for and how to use them. * https://github.com/peterldowns/pgtestdb * https://github.com/peterldowns/testy * https://github.com/peterldowns/pgmigrate
comment by peter_l_downs · 2024-04-03 · in Show HN: Goralim - a rate limiting pkg for Go to handle distributed workloads -
…— considering also implementing this for Django and for Typescript if there is enough interest. https://github.com/peterldowns/pgtestdb
comment by peter_l_downs · 2024-02-28 · in Testcontainers -
…Maybe there is some middle ground where a proxy creates a new cloned db after each connection? https://github.com/peterldowns/pgtestdb
comment by peter_l_downs · 2024-02-17 · in Pgtemp: The easiest way to write tests with Postgres in Rust, without Docker -
…and each test gets a unique and isolated postgres instance — with all your migrations applied. https://github.com/peterldowns/pgtestdb
comment by peter_l_downs · 2023-12-06 · in Go Testing by Example [video] -
▲ 4
Show HN: Pgtestdb, fast Postgres dbs for Golang testsstory by peterldowns · 2023-06-06 · 1 comment
-
…they have questions. If anyone is interested in something similar for postgres, I recently released https://github.com/peterldowns/pgtestdb . It uses template databases and advisory locks to give each test its own unique database with a…
comment by peter_l_downs · 2023-06-04 · in Show HN: SQL Dry Runs with SQL Simulator