by 411111111111111 · 4y ago · 0 comments
OK upon further thought, what you're saying is to use the pg_dump tool that comes with the pg version you are upgrading to.
I read it as "use pg_dump instead of pg_restore"...
If you use -Fc, you can make an SQL file from the dump using pg_restore like this:
pg_restore -f db.sql db.dmp
Or straight to stdout like this: pg_restore -f - db.dmp | grep "database dump complete"
Although I guess if it's corrupted pg_restore won't work.It is really fast, but might not be practical if your database is too big.
nonetheless, interesting way to validate a backup, though it would probably take too long on most dumps