Disk full and WALs

From: John Krasnay <john(at)krasnay(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Disk full and WALs
Date: 2010-08-01 15:22:38
Message-ID: 4C55913E.6040500@krasnay.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-08-01 19:03:22 Re: Disk full and WALs
Previous Message Joshua Tolley 2010-08-01 04:16:57 Re: PostgreSQL and distributed transactions