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

Microsoft Developer · Beginner ·📊 Data Analytics & Business Intelligence ·4w 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

📰
The Data Engineering Skills Matrix AI Just Broke!
Discover how AI is changing data engineering skills and what it means for your team's SQL expertise
Medium · AI
📰
Exploratory Data Analysis (EDA) — New York city Yellow taxi — Part 1: Data Preparation
Learn to prepare data for exploratory data analysis using the New York City Yellow taxi dataset, a crucial step in understanding and visualizing data insights.
Medium · Data Science
📰
Segmentando Clientes com Análise Fatorial e Clustering
Learn to segment customers using factor analysis and clustering, reducing 14 variables to 4 personas
Medium · Data Science
📰
From Four Platforms to One: How Tongcheng Travel Built a Unified Data Integration Platform with…
Learn how Tongcheng Travel unified four data integration platforms into one using Apache technologies and a batch-stream architecture
Medium · Data Science
Up next
This could be the most perfect data frontend
Matt Williams
Watch →