RE: Proposed WAL changes - Mailing list pgsql-hackers

From Mikheev, Vadim
Subject RE: Proposed WAL changes
Date
Msg-id 8F4C99C66D04D4118F580090272A7A234D32FB@sectorbase1.sectorbase.com
Whole thread Raw
In response to Proposed WAL changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposed WAL changes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> > But what can be done if fsync returns before pages flushed?
> 
> When you write out critical information, you keep earlier versions of
> it.  On startup, if the critical information is corrupt, you use the
> earlier versions of it.  This helps protect against the scenario I
> mentioned: a few disk blocks may not have been written when the power
> goes out.
> 
> My impression is that that is what Tom is doing with his patches.

If fsync may return before data *actually* flushed then you may have
unlogged data page changes which breakes WAL rule and means corrupted
(inconsistent) database without ANY ABILITY TO RECOVERY TO CONSISTENT
STATE. Now please explain me how saving positions of two checkpoints
(what Tom is doing) can help here?

Vadim


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: AW: Proposed WAL changes
Next
From: Tom Lane
Date:
Subject: Re: Proposed WAL changes