Re: background writer, WAL and snapshot backups

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Paul Tuckfield <paul(at)tuckfield(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: background writer, WAL and snapshot backups
Date: 2003-11-28 19:54:20
Message-ID: 200311281954.hASJsK213251@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Paul Tuckfield wrote:
> I really like the idea of taking a snapshot backup with postgres, using
> either volume manager or hardware splits in a disk array to get a
> physical backup.
>
> In other, lesser database systems :) the system is structured to prevent
> problems arising from "split block" writes, meaning that though the
> database is writing an 8k block at the instant of the split, the
> intervening drivers may have written a partial block. two ways to
> avoid this problem, as I understand, are:
>
> 1.) freeze all block writes briefly (excluding WAL perhaps).
> Q:) I saw a patch going out to do writes in a background process. is
> this only to help write blocks before absolutely necessary, or is it to
> do *all* writes? if so, this would make adding freeze logic simple
>
> 2.) enable logging of entire blocks to the WAL, so recovery can
> overwrite any partial blocks caught writing at the instant of split.
> Q.) Does the WAL write tuple-level changes or block-level changes.

We write entire 8k pages to WAL on first modify so we can recover
from partial 8k writes.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-11-28 20:02:16 Re: about explain analyze
Previous Message Marc G. Fournier 2003-11-28 19:49:26 Re: about explain analyze