pgcov: Bringing Real Test Coverage to PostgreSQL Code | POSETTE: An Event for Postgres 2026
Skills:
Systems Design Basics70%
Key Takeaways
Introduces pgcov for bringing real test coverage to PostgreSQL code at POSETTE 2026
Original Description
How do you know which parts of your database code are actually executed during tests? See how real test coverage can be brought to PostgreSQL code. Pavlo Golub (Cybertec) presents his talk “pgcov: Bringing Real Test Coverage to PostgreSQL Code” at POSETTE: An Event for Postgres 2026. Abstract: We rely heavily on PostgreSQL functions, procedures, and SQL logic, yet we largely test them as black boxes. Tests may pass, but we rarely know what actually executed and what code paths remain untested.
pgcov proposes a missing piece in the PostgreSQL tooling ecosystem: coverage analysis for SQL and PL/pgSQL, similar to what go test -cover or pytest --cov provides for application code.
The idea is simple:
- treat SQL as first-class source code,
- run isolated tests against it,
- instrument execution at the SQL/PLpgSQL level,
- and produce actionable coverage reports.
pgcov does not require PostgreSQL extensions, does not depend on psql, and is designed to integrate naturally into CI/CD pipelines. It complements existing testing tools like pgTAP by answering a different question:
“Which parts of our database code are actually tested?”
This talk explores the motivation, design approach, and how pgcov can significantly improve confidence in database-centric systems without changing how we write PostgreSQL code today.
Pavlo Golub is a PostgreSQL contributor and co-organizer of PostgreSQL Ukraine User Group, as well as Senior Developer and Expert at Cybertec. He is the author and maintainer of pgxmock library and a scheduling solution for PostgreSQL written in Go called pg_timetable.
► Video chapters:
⏩ 00:00 – Music & introduction
⏩ 01:21 – The PostgreSQL coverage gap explained
⏩ 03:21 – Current testing approaches & limits
⏩ 05:25 – Why coverage matters
⏩ 06:48 – Designing a Postgres coverage tool: pgcov
⏩ 08:54 – pgcov ooverview & key features
⏩ 09:28 – How pgcov works under the hood
⏩ 12:54 – Demo: inventory system example
⏩ 15:02 – Running pgcov and reading results
⏩ 18
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: Systems Design Basics
View skill →Related Reads
📰
📰
📰
📰
How I check duplicate IDs and missing cells in CSV with Python
Dev.to · Kalamari0227
ClickHouse with Examples in FastAPI and Golang: A Practical Guide for High-Performance Analytics
Medium · Python
The Fermi Paradox: Why a Crowded Universe Looks Empty
Medium · Data Science
OpenPowerlifting Veri Seti ile Keşifçi Veri Analizi (EDA): Domain Bilgisinin Önemi ve Anomali…
Medium · Data Science
🎓
Tutor Explanation
DeepCamp AI