Re: Why do we have a WAL record for CLOG page extension?

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Why do we have a WAL record for CLOG page extension?
Date: 2006-06-06 21:08:10
Message-ID: 1149628090.2566.39.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Tue, 2006-06-06 at 10:59 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > Why do we have a WAL record for CLOG page extension?
>
> Think of it as being a substitute for a full-page image, or perhaps the
> init-bit in heap-insert records is the closest analogy. Your patch is
> unworkable because it provides no means for recovering from
> corrupt-on-disk clog pages.

The current system only helps recover from corrupt-on-disk pages that
have been newly written since last checkpoint (or maybe two checkpoints
ago). If the pages were initialised before that then we've simply lost
that data altogether anyhow. Seems like we're writing WAL for a fairly
rare situation, yet we still have some big issues.

Should we hold two copies of the clog for robustness? That way we can
just switch to the second copy if we have problems.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-06-06 22:34:03 Re: [HACKERS] Win32 sysconfig -> pg_service.conf
Previous Message Tom Lane 2006-06-06 15:26:49 Re: 'Index Full Scan' for Index Scan without Index Cond