Error while restoring Postgres DB Dump
Based on the first error message, the .gz backup file seems to be truncated. 

This could be confirmed with the command:

gunzip -c my_db_dump.sql.gz &gt;/dev/null


Presumably this will lead to the same error message: unexpected end of file which is the root cause, the other error from postgres being the consequence of the abrupt end of the data stream.

If the .gz file is a copy resulting from a transfer, you want to compare its size against the size of the original, and transfer it again if it's incomplete. If that's the only copy or if the original itself is incomplete, completing the restore will not be possible.