How to copy a Postgres database?
summary
A new open source tool, pgcopydb, implements a practical answer: it uses pg_dump/pg_restore for schema but streams table data with a custom COPY protocol, runs pgcopydb clone as a reproducible 10 steps pipeline, copies tables in parallel, chunks huge tables, builds indexes concurrently (including primary keys), does COPY FREEZE and VACUUM, resumes after interruptions, migrates roles via pg_dumpall, and supports Change Data Capture with logical decoding and wal2json compatibility using --follow to catch and replay changes; large objects aren’t CDC-replicated.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:24How to copy a Postgres database?
- 7:32Introducing pgcopydb
- 9:24The 10 steps of pgcopydb clone
- 13:21pgcopydb concurrency and features
- 15:32Privileges & pgcopydb
- 17:26Change Data Capture
- 19:04Database Migration Complexity
- 21:35The 7 steps of pgcopydb follow
related talks
51mWhen Postgres Can't, You Can!
50mPostgreSQL Backup and Recovery Methods
46mAn ultimate guide to upgrading your PostgreSQL installation
25mPG Extractor - A smarter pg dump
49mTools for Creating PostgreSQL Backups
37mPostgres at Any Scale
45mSQL Server to PostgreSQL: Migration Challenges & Solutions
56mPostgreSQL Backup Strategies
