This patch modifies the ReadStr function in pg_backup_archiver.c to validate the result of *AH->ReadBufPtr matches the value of l. The resulting error is:
pg_restore: [archiver] expected 410 bytes, only got 275 bytes
pg_restore.diff
Description: Binary data
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
