nowfound

Dev tools · September 14, 2025

IM

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 →

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • 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

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, September 2025

the whole month →
  • YouMind1,226

    The first AI creation studio where learning meets writing

    AI · Sep 2025 · youmind.com

  • 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

  • Ada911

    Your own AI data analyst

    AI · 2025 · ada.im

  • Turn Product Images into Scroll-Stopping Video Ads

    Growth · Sep 2025 · vidau.ai