Disk full and WALs - Mailing list pgsql-general

From John Krasnay
Subject Disk full and WALs
Date
Msg-id 4C55913E.6040500@krasnay.ca
Whole thread Raw
Responses Re: Disk full and WALs
List pgsql-general
Hi folks,

I recently ran into an issue with PostgreSQL 8.3 on a disk that became
full. We freed up some space and restarted PostgreSQL, but startup
failed with the following error:

2010-08-01 08:21:19 EDT FATAL:  invalid data in file
"00000001000002BD00000072.00000020.backup"

The indicated file has zero bytes.

We decided to do a point-in-time recovery, but that failed too, since
the archived WAL file 00000001000002BD00000072 was zero-length. Looking
at the logs, the archive command for this file failed at about 6:29am,
but the server continued on until later in the evening when we noticed
there was a disk space problem.

Now our problem is that we appear to have lost a whole day's worth of
data, since we can't do a PITR past the failed archive log.

The documentation says that if the archive command fails, the server
retries until it's successful, but that appears not to have happened. It
looks like the zero-length file that PostgreSQL complained about,
00000001000002BD00000072.00000020.backup, might be related to this.

Does anyone have any idea how we might recover from this? Could this be
a bug in how PostgreSQL deals with archive logging?

Thanks.

jk

pgsql-general by date:

Previous
From: Joshua Tolley
Date:
Subject: Re: PostgreSQL and distributed transactions
Next
From: Tom Lane
Date:
Subject: Re: Disk full and WALs