Hacker GitHub

← All repos

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

Mentions per year 13 mentions · busiest year 2024 (8)
20082026
  1. 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…
  2. …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
  3. 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
  4. 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
  5. …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
  6. 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
  7. …probably also just run a postgres binary and store the data on a memory-backed filesystem. [0] https://github.com/peterldowns/pgtestdb
  8. …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
  9. …— 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
  10. …Maybe there is some middle ground where a proxy creates a new cloned db after each connection? https://github.com/peterldowns/pgtestdb
  11. …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]
  12. …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