Migrating to PostgreSQL: A pgTAP Case Study
April 21–22
Moving to PostgreSQL? Testing matters. Motivated by customer needs, we sought a balance between updating existing tools or creating an extension. Join me as I share our pgTAP story, covering fundamentals, what we built, and why.
One of the challenge when migrating critical systems to PostgreSQL is robust and comprehensive testing. Our team faced a common dilemma: should we adapt existing testing tools or build something new? Customer requirements guided us toward a solution that needed to be both powerful and maintainable, leading to an unexpected journey with pgTAP.
This talk explores our decision to build a PostgreSQL extension using the Rust-based PGRX framework. We’ll examine why PGRX provided the right foundation for our testing infrastructure, as well its place in the PostgreSQL extension ecosystem. Central to our approach was leveraging pgTAP’s “Compose Yourself” philosophy. Rather than using pgTAP functions in isolation, we built reusable testing components that combine pgTAP’s ok() function with custom logic.