On Sun, 3 Jul 2005 04:47 pm, Greg Stark wrote:
>
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
>
> > I have an idea! Currently we write the backup pages (copies of pages
> > modified since the last checkpoint) when we write the WAL changes as
> > part of the commit. See the XLogCheckBuffer() call in XLogInsert().
>
> Can someone explain exactly what the problem being defeated by writing whole
> pages to the WAL log? Like, if page is half flushed to disk and contains half
> the old data and half of the new data, what exactly would go wrong with
> recovery? When postgres sees the write why would it have trouble recovering
> the correct contents for the page based on the half-written page and the
> regular WAL entry?
Problem we are solving.
Checkpoint Happens. (Ensuring that ALL data make it to the disk) - This means we don't need the information in WAL
beforethe checkpoint.
We write some updates to the db, changing some pages.
The Power is pulled and one page is half written. There is no way to know if the page is in a valid state. There is no
wayto recover the page from wal, becuase unless we wrote the full page into wal, we don't have a "starting point" for
modification.
That's probably very unclear but that is the idea.
Regards
Russell Smith