pgcov: Bringing Real Test Coverage to PostgreSQL Code | POSETTE: An Event for Postgres 2026

Microsoft Developer · Beginner ·📊 Data Analytics & Business Intelligence ·1mo ago

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

Related Reads

📰
How I check duplicate IDs and missing cells in CSV with Python
Learn to check duplicate IDs and missing cells in CSV files using Python's standard library
Dev.to · Kalamari0227
📰
ClickHouse with Examples in FastAPI and Golang: A Practical Guide for High-Performance Analytics
Learn to use ClickHouse for high-performance analytics with examples in FastAPI and Golang
Medium · Python
📰
The Fermi Paradox: Why a Crowded Universe Looks Empty
Explore the Fermi Paradox and its implications on the search for life in the universe, and why it matters for astrobiology and the future of space exploration
Medium · Data Science
📰
OpenPowerlifting Veri Seti ile Keşifçi Veri Analizi (EDA): Domain Bilgisinin Önemi ve Anomali…
Learn how to apply exploratory data analysis (EDA) on a real-world dataset, OpenPowerlifting, and understand the importance of domain knowledge in data science
Medium · Data Science
Up next
This could be the most perfect data frontend
Matt Williams
Watch →