Sample Header Ad - 728x90

`pg_restore` unable to read `toc.dat` created by `pg_dump -Fd`: `pg_restore: error: expected format (1) differs from format found in file (3)`

0 votes
1 answer
3648 views
The pg_dump -Fd mydb -f mydb.dump command creates a mydb.dump directory with a toc.dat file. The pg_dump man page mentions that pg_restore is able to read this file, but after skimming its man page and stumbling upon this PostgreSQL mailing list thread , I get this cryptic error:
$ pg_restore -l mydb.dump/toc.dat

pg_restore: error: expected format (1) differs from format found in file (3)
Asked by toraritte (121 rep)
Sep 26, 2023, 06:32 PM
Last activity: Sep 27, 2023, 06:28 PM