Database School

Sharding Postgres without extensions with PgDog founder, Lev Kokotov

Aug 19, 2025
Lev Kokotov, founder of PgDog and previously a database engineer at Instacart, discusses his journey from creating PgCat to developing PgDog, an innovative sharding solution for Postgres. He dives into the challenges of scaling databases without extensive rewriting or extensions. Lev shares insights about applying to Y Combinator as a solo founder and PgDog's unique architecture that enhances query handling across multiple instances. The conversation also touches on future developments and the importance of community engagement in shaping PgDog's features.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ANECDOTE

Building PgCat During A Sabbatical

  • Lev wrote PgCat during a month off between jobs and shared it with Instacart friends.
  • Instacart ran it against production and migrated from PgBouncer to PgCat.
INSIGHT

Why Run Sharding Outside Postgres

  • PGDog runs outside Postgres and copies PG's SQL parser for compatibility.
  • Running the sharding layer externally allows horizontal scaling and much lower latency than an in-DB coordinator.
ADVICE

Prefer Network Tools Over Extensions For Adoption

  • Avoid building features as Postgres extensions when distribution matters.
  • Deploy network-layer apps instead so customers on RDS/GCP/Azure can adopt without DB binaries.
Get the Snipd Podcast app to discover more snips from this episode
Get the app