Re: Checkpoint cost, looks like it is WAL/CRC

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Checkpoint cost, looks like it is WAL/CRC
Date: 2005-07-03 11:21:56
Message-ID: 200507032121.56662.mr-russ@pws.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 3 Jul 2005 04:47 pm, Greg Stark wrote:
>
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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 before the 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 way to 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew D. Fuller 2005-07-03 12:49:33 Re: Autotools update
Previous Message Dawid Kuroczko 2005-07-03 09:26:12 Re: [HACKERS] Dbsize backend integration