Logical replication mereplikasi perubahan data pada peringkat jadual tertentu (menggunakan model publish/subscribe), berbanding menyalin keseluruhan kluster pangkalan data bait demi bait seperti replikasi fizikal (streaming). Ini menjadikannya fleksibel — terpilih, merentas versi, dan ke skema yang berbeza — sesuai untuk migrasi dan integrasi.
Logical vs physical replication
PHYSICAL (streaming) → replicates the ENTIRE cluster at the storage/WAL level
✓ exact copy, simple ✗ all-or-nothing, same Postgres version, read-only replica
LOGICAL → replicates specific TABLES' changes via a publish/subscribe model
✓ SELECTIVE (choose tables), CROSS-VERSION, to DIFFERENT schemas, replica is WRITABLE
✗ more setup, some limitations (DDL not replicated automatically, etc.)
