Re: pg_restore: could not close data file: Success

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_restore: could not close data file: Success
Date: 2020-04-15 10:14:25
Message-ID: 20200415101425.GA25489@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 2020-04-15 12:01:46 +0200, Peter J. Holzer wrote:
> I'm trying to restore a backup on a different machine and it terminates
> with the not really helpful messages:
>
> pg_restore: [directory archiver] could not close data file: Success
> pg_restore: [parallel archiver] a worker process died unexpectedly
[...]
> My guess is that maybe one of the data files is damaged

As is often the case the matter became obvious a few minutes after
writing the mail.

There were indeed two file with length 0 in the dump. That happened
because the backup failed because it couldn't obtain a lock on a table.

I nicer error message (something like "cannot decompress '13503.dat.gz':
Empty file") would have helped.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-04-15 14:22:58 Re: pg_basebackup && long time storage of wal_archive/ content
Previous Message Peter J. Holzer 2020-04-15 10:01:46 pg_restore: could not close data file: Success

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2020-04-15 10:25:20 Re: Allow pg_read_all_stats to read pg_stat_progress_*
Previous Message Zhang, Jie 2020-04-15 10:06:52 [PATHC] Fix minor memory leak in pg_basebackup