You must move a database to a server running a different major version on a different CPU architecture.
Which is generally the safer choice, and why?
# option A (physical): copy the raw data files
# option B (logical): pg_dump olddb | psql -h newhost newdbWhich is generally the safer choice, and why?
- aThe physical file copy, since raw data files are always compatible across versions and CPU architectures
- bNeither works — data moves between servers only by configuring streaming replication first
- cEither is equivalent here, because the backup format has no bearing on cross-platform portability
- dThe logical SQL dump, since it is portable and can be reloaded into a different version or platform✓
Explanation:Physical backups copy engine-internal file formats that can differ between major versions and architectures, so restoring them elsewhere is fragile. A logical dump is engine-readable SQL/data, which is exactly why it is the standard tool for cross-version and cross-platform moves. Replication (b) keeps copies in sync but is not a prerequisite for migration.