Vijaykumar Jain <
vijaykumarjain.github@xxxxxxxxx> writes:
On Tue, 3 Aug 2021 at 08:19, Gilar Ginanjar <gilar@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
I'm not sure which pg_dump version did i use before, but I used psql 12.5
to dump and the db version is postgresql 9.6.
pgrestore command:
pg_restore -U myuser -j8 -d mydb dbdump.backup
I’ve tried to restore to postgre 9.6, 12.1 and 12.5
9.6 has had a lot of minor fixes all the way to 9.6.22 , I am speculating,
maybe your restoration to the latest minor version is failing.
This error is internal to pg_restore, so the target server version isn't
going to make any difference. Either the dump file is corrupt, or more
likely you're dealing with a pg_restore bug or version discrepancy.
(pg_restore *should* complain if the archive file is too new, but there
were some bugs in that code until recently :-(.)
Anyway, people have asked for the pg_restore version several times,
and I hope this explains why it's critical information. *PLEASE*
show us the output of "pg_restore --version". It would also be
useful to see the first dozen or two lines of output from
"pg_restore -l -v dbdump.backup", which should include the dump
file's version as well as the source pg_dump's version.
regards, tom lane