PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16458
PG Version10.12
OSUbuntu 18.04.4 LTS
Opened2020-05-25 00:02:58+00
Reported byCris Pond

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16458
Logged by:          Cris Pond
Email address:      (redacted)
PostgreSQL version: 10.12
Operating system:   Ubuntu 18.04.4 LTS

I'm coming across a similar problem to bug #6127 here:

We have a backup file that appears to be corrupted which will restore schema
and some data, but will not restore all data, giving the "pg_restore:
[custom archiver] could not read from input file: end of file" error on the
command line and "ERROR:  unexpected message type 0x58 during COPY from
stdin" in the log.

It appears it starts to copy from standard input and then just dies.  The
backup was apparently dumped in custom format.

My apologies if there is already a way to do this, but could pg_restore do a
basic check on the actual data in the dump file to make sure it's there on a
--list query?  The corrupt dump file has never reported errors on a list,
and reports "TABLE DATA" in the affected tables.

We were relying on that output to be sure our backups were working properly,
and it's extremely frustrating that the data are gone now that we really
need them.


2020-05-25 00:02:58+00PG Bug reporting formBUG #16458: pg_restore lists data in corrupted backup files without checking if data exists