Logical replication replica i cambiamenti ai dati a livello di tabelle specifiche (usando un modello publish/subscribe), piuttosto che copiare l'intero cluster di database byte-per-byte come fa la replica fisica (streaming). Questo la rende flessibile — selettiva, compatibile tra versioni e verso schemi diversi — ideale per migrazioni e integrazioni.
Replica logica vs replica fisica
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.)
