Logical replication data परिवर्तनों को विशिष्ट tables के स्तर पर (एक publish/subscribe model का उपयोग करके) replicate करता है, बजाय physical (streaming) replication की तरह पूरे database cluster को byte-दर-byte copy करने के। यह इसे लचीला बनाता है — selective, cross-version, और विभिन्न schemas पर — migrations और integrations के लिए आदर्श।
Logical बनाम 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.)
