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

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: cpond(at)telecomassets(dot)com
Subject: BUG #16458: pg_restore lists data in corrupted backup files without checking if data exists
Date: 2020-05-25 00:02:58
Message-ID: 16458-e5b9c1930f71db9b@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16458
Logged by: Cris Pond
Email address: cpond(at)telecomassets(dot)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.

Browse pgsql-bugs by date

  From Date Subject
Next Message shawn wang 2020-05-25 03:37:42 Re: [bug] Table not have typarray when created by single user mode
Previous Message PG Bug reporting form 2020-05-24 15:43:03 BUG #16457: Implicit signed integer truncation or sign change at sortsupport.c:60