Logisk replikering replikerar dataförändringar på nivån för specifika tabeller (med en publish/subscribe-modell), snarare än att kopiera hela databasklustret byte-för-byte som fysisk (streaming) replikering gör. Detta gör den flexibel — selektiv, versionsöverkorsande och till olika scheman — idealisk för migrering och integrering.
Logisk jämfört med fysisk replikering
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.)
