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