Conference Schedule - PGCon 2022

Cloning Postgres databases on Kubernetes: how we designed database forks in a managed database-as-a-service

Date: 2022-05-27
Time: 12:15 - 13:15
Room: Stream 1
Level: Intermediate

Database forks, known as clones, bring in a simple way to copy a production database into the staging one or use the data for testing queries, allow selective point-in-time data recovery without disrupting the primary database and provide a way to experiment with production database configuration without downtime. In this talk, I’ll describe how we designed and built this feature based on open-source tools well known in the PostgreSQL community:

I’ll start by describing how we run PostgreSQL with TimescaleDB on Kubernetes, and how we used pgBackRest, Patroni, and various AWS/Kubernetes objects to implement database forking. I’ll dive deep into our motivation to implement forks and talk about various types of forks - i.e point in time recovery, follower forks, snapshot-based forks, and how they can be implemented based on underlying open-source technologies. Lasty, I’ll describe our approach to test backups recoverability and recover PostgreSQL clusters from the storage failures.


Oleksii Kliukin