Dev tools · September 14, 2025
I made pgdbtemplate to cut PostgreSQL test time by 1.5x using templates
Tired of your Go tests being slowed down by repetitive PostgreSQL database setup? I built pgdbtemplate to solve exactly that. It uses PostgreSQL's native template databases to create fully migrated test databases in milliseconds instead of seconds. The problem: Traditional test setup runs all your migrations for every single test. With a complex schema, this wastes minutes in every test run. The solution: Create one "golden" template database. Every test gets its own isolated copy instantly via CREATE DATABASE ... TEMPLATE. Benchmarks don't lie: - 1.5x faster for complex schemas (5+ tables)…
What it does
In the maker’s words, at launch
Tired of your Go tests being slowed down by repetitive PostgreSQL database setup? I built pgdbtemplate to solve exactly that. It uses PostgreSQL's native template databases to create fully migrated test databases in milliseconds instead of seconds. The problem: Traditional test setup runs all your migrations for every single test. With a complex schema, this wastes minutes in every test run. The solution: Create one "golden" template database. Every test gets its own isolated copy instantly via CREATE DATABASE ... TEMPLATE. Benchmarks don't lie: - 1.5x faster for complex schemas (5+ tables) - 37% time saved creating 200 databases - 17% less memory usage - Performance gains increase with schema complexity It's: - Thread-safe and built for t.Parallel() - Driver-agnostic: works with both pgx and pq - Integrates with testcontainers-go - MIT Licensed I'd love feedback from the HN community, especially on: - The API design (ConnectionProvider/MigrationRunner interfaces) - Ideas for further performance optimizations - Security audit of the SQL formatting code Check out the code and benchmarks on GitHub: https://github.com/andrei-polukhin/pgdbtemplate
Does the same job
all alternatives →
- SUSpeeding up PostgreSQL through vectorized execution2014 · github.com · ▲332

- DGDbdot – Golang tool to help generate Postgres schema diagrams2019 · github.com · ▲119
- PPPgCat, Postgres pooler with sharding, load balancing and failover2022 · github.com · ▲233
- TSToroDB Stampede: Automagical MongoDB to PostgreSQL, 100x Faster Queries2016 · torodb.com · ▲43
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 2d ago · opentrailpaper.com

Launched alongside, September 2025
the whole month →
- AS
Commerce · Sep 2025 · anycrap.shop
- TE
I made a built-from scratch Wayland Compositor to display any GUI app* in the terminal! I think there is a lot of unexplored potential in custom Wayland compositors, a lot of really cool things you can embed existing applications into! So, I started with embedding apps into the terminal because that is the easiest input/output (output is just utf-8 and I use the great `chafa` library for that, and I just read from stdin for the input). If you have any other ideas for cool Wayland compositors, let me know. I purposedly wrote 80% the app in Typescript to appeal to the most developers and…
Dev tools · Sep 2025 · github.com
- IR
Years ago I stumbled across a basic version of this concept and it stuck with me. I knew if I was ever going to take on such a project, it would need to be flawless, but without coding experience it was just another idea that would never happen. By the end of 2024, as AI coding tools exploded everywhere, I finally had a way to make it real. I started from zero knowledge and spent months collaborating with AI agents as a learning experience. Every pixel and every function went through me. The AI translated what I asked for into code, but every decision was human. I didn't use existing OS…
AI · Sep 2025 · mitchivin.com

