Re: WAL replay failure after file truncation(?) - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: WAL replay failure after file truncation(?)
Date
Msg-id 1117209286.3844.559.camel@localhost.localdomain
Whole thread Raw
In response to Re: WAL replay failure after file truncation(?)  (Manfred Koizar <mkoi-pg@aon.at>)
List pgsql-hackers
On Wed, 2005-05-25 at 21:24 +0200, Manfred Koizar wrote:
> WAL replay does not apply changes to nonexistent blocks,
> but it keeps a list (hash table, file, whatever) of those blocks.
> When a truncate WAL record is found, all entries for blocks affected
> by the truncation are removed from the list.  Is it sufficient to
> remember just the relation and the block number or do we need the
> contents a well?
> 
> If the list is non-empty at the end of WAL replay, this is evidence of
> a serious problem (file system corruption or Postgres bug).

Seems like a very neat solution.

It has no side effects and seems fairly performant.

Judging by the number of PANICs reported, the data structure would be
mostly empty anyhow.

Best Regards, Simon Riggs



pgsql-hackers by date:

Previous
From: "David Parker"
Date:
Subject: Re: logging sql from JDBC
Next
From: Curt Sampson
Date:
Subject: Re: Multiple-statement Rules Incompatible With Constraints