HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
andrei-polukhin
pgdbtemplate
Go2025–2025
andrei-polukhin / pgdbtemplate

pgdbtemplate

Go library for creating PostgreSQL test databases using template databases for lightning-fast test execution.

2Distinct people
3Mentions
0Explicit recommenders
80GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Go library for creating PostgreSQL test databases using template databases for lightning-fast test execution.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 3-hour interval3 dated mentions

Observed mentions: 2025-09-10 20:36:03 UTC to 2025-09-14 16:07:55 UTC.

012025-09-10 18:00:00 UTC to 2025-09-10 21:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsSep 10, 18:002025-09-10 21:00:00 UTC to 2025-09-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 00:00:00 UTC to 2025-09-11 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 03:00:00 UTC to 2025-09-11 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 06:00:00 UTC to 2025-09-11 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 09:00:00 UTC to 2025-09-11 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 12:00:00 UTC to 2025-09-11 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 15:00:00 UTC to 2025-09-11 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 18:00:00 UTC to 2025-09-11 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-11 21:00:00 UTC to 2025-09-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-12 00:00:00 UTC to 2025-09-12 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-12 03:00:00 UTC to 2025-09-12 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-12 06:00:00 UTC to 2025-09-12 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-12 09:00:00 UTC to 2025-09-12 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-12 12:00:00 UTC to 2025-09-12 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-12 15:00:00 UTC to 2025-09-12 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsSep 12, 15:002025-09-12 18:00:00 UTC to 2025-09-12 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-12 21:00:00 UTC to 2025-09-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-13 00:00:00 UTC to 2025-09-13 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-13 03:00:00 UTC to 2025-09-13 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-13 06:00:00 UTC to 2025-09-13 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-13 09:00:00 UTC to 2025-09-13 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-13 12:00:00 UTC to 2025-09-13 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-13 15:00:00 UTC to 2025-09-13 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-13 18:00:00 UTC to 2025-09-13 21:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-09-13 21:00:00 UTC to 2025-09-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-14 00:00:00 UTC to 2025-09-14 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-14 03:00:00 UTC to 2025-09-14 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-14 06:00:00 UTC to 2025-09-14 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-14 09:00:00 UTC to 2025-09-14 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-14 12:00:00 UTC to 2025-09-14 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-14 15:00:00 UTC to 2025-09-14 18:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsSep 14, 15:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Sep 10, 18:002025-09-10 18:00:00 UTC2025-09-10 21:00:00 UTC110
Sep 10, 21:002025-09-10 21:00:00 UTC2025-09-11 00:00:00 UTC000
Sep 11, 00:002025-09-11 00:00:00 UTC2025-09-11 03:00:00 UTC000
Sep 11, 03:002025-09-11 03:00:00 UTC2025-09-11 06:00:00 UTC000
Sep 11, 06:002025-09-11 06:00:00 UTC2025-09-11 09:00:00 UTC000
Sep 11, 09:002025-09-11 09:00:00 UTC2025-09-11 12:00:00 UTC000
Sep 11, 12:002025-09-11 12:00:00 UTC2025-09-11 15:00:00 UTC000
Sep 11, 15:002025-09-11 15:00:00 UTC2025-09-11 18:00:00 UTC000
Sep 11, 18:002025-09-11 18:00:00 UTC2025-09-11 21:00:00 UTC000
Sep 11, 21:002025-09-11 21:00:00 UTC2025-09-12 00:00:00 UTC000
Sep 12, 00:002025-09-12 00:00:00 UTC2025-09-12 03:00:00 UTC000
Sep 12, 03:002025-09-12 03:00:00 UTC2025-09-12 06:00:00 UTC000
Sep 12, 06:002025-09-12 06:00:00 UTC2025-09-12 09:00:00 UTC000
Sep 12, 09:002025-09-12 09:00:00 UTC2025-09-12 12:00:00 UTC000
Sep 12, 12:002025-09-12 12:00:00 UTC2025-09-12 15:00:00 UTC000
Sep 12, 15:002025-09-12 15:00:00 UTC2025-09-12 18:00:00 UTC000
Sep 12, 18:002025-09-12 18:00:00 UTC2025-09-12 21:00:00 UTC000
Sep 12, 21:002025-09-12 21:00:00 UTC2025-09-13 00:00:00 UTC000
Sep 13, 00:002025-09-13 00:00:00 UTC2025-09-13 03:00:00 UTC000
Sep 13, 03:002025-09-13 03:00:00 UTC2025-09-13 06:00:00 UTC000
Sep 13, 06:002025-09-13 06:00:00 UTC2025-09-13 09:00:00 UTC000
Sep 13, 09:002025-09-13 09:00:00 UTC2025-09-13 12:00:00 UTC000
Sep 13, 12:002025-09-13 12:00:00 UTC2025-09-13 15:00:00 UTC000
Sep 13, 15:002025-09-13 15:00:00 UTC2025-09-13 18:00:00 UTC000
Sep 13, 18:002025-09-13 18:00:00 UTC2025-09-13 21:00:00 UTC110
Sep 13, 21:002025-09-13 21:00:00 UTC2025-09-14 00:00:00 UTC000
Sep 14, 00:002025-09-14 00:00:00 UTC2025-09-14 03:00:00 UTC000
Sep 14, 03:002025-09-14 03:00:00 UTC2025-09-14 06:00:00 UTC000
Sep 14, 06:002025-09-14 06:00:00 UTC2025-09-14 09:00:00 UTC000
Sep 14, 09:002025-09-14 09:00:00 UTC2025-09-14 12:00:00 UTC000
Sep 14, 12:002025-09-14 12:00:00 UTC2025-09-14 15:00:00 UTC000
Sep 14, 15:002025-09-14 15:00:00 UTC2025-09-14 18:00:00 UTC110

What Hacker News says

3 sources

Show HN: 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) - 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 L
Read the rest
icensed 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
5 points · Open discussion

Show HN: Pgdbtemplate – fast PostgreSQL test databases in Go using templates

Dear community, I have heard that appropriate self-promotion is allowed on this forum, so I want to welcome `pgdbtemplate`. It is the Go library for creating PostgreSQL test databases using template databases for lightning-fast test execution. Have you ever used PostgreSQL in your tests and been frustrated by how long it takes to spin up the database and run its migrations? `pgdbtemplate` offers... - Proven benchmarks showing 1.2x-1.6x faster performance than the traditional approach - Seamless integration with your projects by supporting both "github.com/lib/pq" and "github.com/jackc/pgx/v5" PostgreSQL drivers, as well as configurable connection pooling - Built-in migration handling - Full `testcontainers-go` support - Robust security implementation: safe against SQL injections, fully thread-safe operations - Production-ready
Read the rest
quality: SOLID principles enabling custom connectors and migration runners, >98% test coverage, and comprehensive documentation Ready to see how it works? Follow [this](https://github.com/andrei-polukhin/pgdbtemplate?tab=readme-o...) link and see the "Quick Start" example on how easily you can integrate `pdbtemplate` into your Go tests. I welcome feedback and questions about code abstractions, implementation details, security considerations, and documentation improvements. Thank you for reading this post. Let's explore how I can help you.
2 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.