pg_dump custom vs. plain format: which should you use?

Custom format for backups, plain SQL for reading and hand-editing, directory format for big databases. Here's why.

Updated October 14, 2026 · 3 min read

Short on time? PostgresBackup does everything on this page from a Windows app: scheduled pg_dump backups, retention and one-click restores. Download it free.

Short answer: use the custom format (-F c) for backups. It's compressed, it restores selectively and in parallel, and any recent pg_restore reads it. Use plain SQL when a human (or a diff) needs to read the output.

The four formats

Custom -F cPlain SQL (default)Directory -F dTar -F t
OutputOne binary fileOne .sql text fileA folder of filesOne .tar file
CompressedYes, by defaultNo (unless -Z)Yes, per tableNo
Restore withpg_restorepsqlpg_restorepg_restore
Restore one tableYesOnly by editing the fileYesYes
Parallel restore (-j)YesNoYesNo
Parallel dump (-j)NoNoYesNo
Readable in a text editorNoYesNoNo

Why custom format is the default choice for backups

  • Smaller. Compression typically shrinks text-heavy data several times over.
  • Selective restores. pg_restore -t orders pulls one table out of a full backup; pg_restore -l lists what's inside.
  • Faster restores. pg_restore -j 4 rebuilds tables and indexes in parallel.
  • Order handled for you. pg_restore sorts out dependencies, so you can skip or reorder parts.

The trade-off is that you need pg_restore (part of the standard client tools) to read it, and it must be at least as new as the pg_dump that wrote the file.

When plain SQL is the better fit

  • You want to read or diff the backup, or keep schema in version control (pg_dump --schema-only as plain SQL is great for that).
  • You need to edit before restoring: rename a schema, strip an extension.
  • You're moving data to something that only speaks SQL.

Plain dumps restore with psql -f backup.sql. They can't restore in parallel, and getting one table out means editing the file.

When to reach for the directory format

For databases in the tens of gigabytes and up, the directory format is the only one that dumps in parallel:

PowerShell
pg_dump -h db.example.com -U app -F d -j 4 -f D:\Backups\shop_20261014 shop

It writes a folder rather than a file, which is a little more awkward to copy around. Zip it, or copy the whole folder.

Compression level

Custom and directory formats compress with gzip level 6 by default. -Z 1 is noticeably faster for a slightly larger file. That's a good trade for nightly backups, where speed matters more than a few percent of disk. pg_dump 16 and later can also use lz4 or zstd (--compress=zstd), which are faster still. Every pg_restore that can read the archive version handles them.

What PostgresBackup uses

PostgresBackup writes custom-format dumps (pg_dump -Fc) with fast compression (-Z 1): about half the dump time of the default, for files around 7% larger. Any pg_restore of the same or newer version can read them, so you're never locked in. Clones accept extra pg_dump and pg_restore options if you need something different, and restores handle plain .sql files with psql.

The shortcut

Rather not maintain a backup script?

PostgresBackup is a Windows app that does all of this for you, with nothing to script and nothing to remember.

  • Scheduled pg_dump backups from a background service that starts with Windows
  • Keep the last N files plus hourly, daily, weekly, monthly and yearly copies
  • Restore any backup, or clone a database to another server, in a few clicks
  • PostgreSQL client tools included; standard .dump files, no lock-in
  • No account, no subscription, nothing leaves your machine

Clones, restores and manual backups are free. Scheduled backups are free for 14 days, then $9.99 once (launch price; $24 from January 1).