logical-backup · shipping · also logical backup

Logical database backup

A logical database backup represents selected schema objects and data as an export that a compatible engine can reconstruct instead of copying native storage pages.

Related Observatory article: Read on hesela.com

Logical describes the representation, not the packaging. pg_dump produces SQL scripts for psql or archives for pg_restore. A binary or compressed archive is still logical. It covers one database; definitions of cluster-wide roles and tablespaces need separate coverage. [1]

PostgreSQL dumps generally support migration to newer server versions and different architectures. This is not a promise of compatibility with every engine or version. [2]

A pg_dump export cannot serve as a base for WAL replay. Continuous archiving needs a suitable physical base and the required WAL sequence. [3]

SQLite's .dump exports SQL for reconstruction. Neither an export's label nor successful import proves that application identities and dependencies survived; test the required behavior. [4] [5]

A stable export snapshot is not automatically serializable. For a reporting copy of a changing PostgreSQL database, pg_dump --serializable-deferrable waits for a suitable snapshot. PostgreSQL documents no benefit for dumps used only for disaster recovery. With no read-write transactions active at startup it makes no difference; otherwise startup may be delayed for an indeterminate time. [1]

Row scope: pg_dump normally errors when row security applies. --enable-row-security explicitly exports only permitted rows. Record the role, policy and intended inventory; an exact same-role comparison can agree after a partial restore. [6] [7]

Relations

related
Physical database backup, Backup, Full backup, Backup verification, Restore test, Point-in-time recovery, SQLite Online Backup API, Snapshot isolation, Serializability

Advantages

  • PostgreSQL archive dumps support selecting objects for restoration. [1]

Limitations

  • PostgreSQL pg_dump uses a consistent snapshot of one database, but pg_dumpall invokes it separately for each database; those snapshots are not synchronized. Recovery dependencies spanning databases need a separate coordination plan. [2]

Citations

  1. PostgreSQL 18: pg_dump, formats and object scope (accessed 2026-10-29)
  2. PostgreSQL 18: SQL Dump, portability and pg_dumpall consistency (accessed 2026-10-29)
  3. PostgreSQL 18: Continuous Archiving and Point-in-Time Recovery (accessed 2026-10-29)
  4. SQLite CLI: converting a database to SQL text (accessed 2026-10-29)
  5. Hesela: backup verification and restored application identity (accessed 2026-10-29)
  6. PostgreSQL 16: pg_dump and explicit row-security filtering (accessed 2026-11-22)
  7. Hesela: PostgreSQL 16.15 row-security backup controls and exact transcripts (accessed 2026-11-22)
Sources & caveats
  • RLS evidence uses two fresh private clusters, 15 export and four destination controls per cluster, four synthetic rows and one host/build. No concurrency, ACL-preservation, field-rate or new-defect claim. [7]

JSON: /data/terms/logical-backup.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Logical database backup. Hesela. 2026-11-22. https://hesela.dev/terms/logical-backup/