Re: [PATCHES] Full page writes improvement, code update

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
Cc: "Koichi Suzuki" <suzuki(dot)koichi(at)oss(dot)ntt(dot)co(dot)jp>, <josh(at)agliodbs(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCHES] Full page writes improvement, code update
Date: 2007-03-30 10:15:16
Message-ID: 1175249717.4386.716.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, 2007-03-30 at 10:22 +0200, Zeugswetter Andreas ADI SD wrote:
> > Without a switch, because both full page writes and
> > corresponding logical log is included in WAL, this will
> > increase WAL size slightly
> > (maybe about five percent or so). If everybody is happy
> > with this, we
> > don't need a switch.
>
> Sorry, I still don't understand that. What is the "corresponding logical
> log" ?
> It seems to me, that a full page WAL record has enough info to produce a
>
> dummy LSN WAL entry. So insead of just cutting the full page wal record
> you
> could replace it with a LSN WAL entry when archiving the log.
>
> Then all that is needed is the one flag, no extra space ?

The full page write is required for crash recovery, but that isn't
required during archive recovery because the base backup provides the
safe base. Archive recovery needs the normal xlog record, which in some
cases has been optimised away because the backup block is present, since
the full block already contains the changes.

If you want to remove the backup blocks, you need to put back the
information that was optimised away, otherwise you won't be able to do
the archive recovery correctly. Hence a slight increase in WAL volume to
allow it to be compressed does make sense.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-03-30 10:20:04 Minor changes to Recovery related code
Previous Message Heikki Linnakangas 2007-03-30 09:50:40 Re: Autovacuum vs statement_timeout

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-03-30 10:20:04 Minor changes to Recovery related code
Previous Message ITAGAKI Takahiro 2007-03-30 08:59:56 Dead Space Map version 3 (simplified)