Обсуждение: BUG #16458: pg_restore lists data in corrupted backup files without checking if data exists

Поиск
Список
Период
Сортировка

BUG #16458: pg_restore lists data in corrupted backup files without checking if data exists

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      16458
Logged by:          Cris Pond
Email address:      cpond@telecomassets.com
PostgreSQL version: 10.12
Operating system:   Ubuntu 18.04.4 LTS
Description:

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

https://www.postgresql.org/message-id/CAD6QHKQdqgi%3DVidKM6Erj9Vi8Z6ff_bBncqtt-hJX3Z%2Bn9KTyQ%40mail.gmail.com

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.