Re: Simplifying wal_sync_method

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Marko Kreen <marko(at)l-t(dot)ee>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Simplifying wal_sync_method
Date: 2005-08-09 14:58:13
Message-ID: 200508091458.j79EwDR23421@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
> > > > Now thinking about it, the guy had corrupt table, not WAL log.
> > > > How is WAL->tables synched? Does the 'wal_sync_method'
> > > > affect it or not?
> > >
> > > I *think* it always fsyncs() there as it is now, but I'm
> > not 100% sure.
> >
> > wal_sync_method is also used to flush pages during a
> > checkpoint, so it could lead to table corruption too, not
> > just WAL corruption.
> >
> > However, on Unix, 99% of corruption is caused by bad disk or RAM.
>
> ... or iDE disks with write cache enabled. I've certainly seen more than
> what I'd call 1% (though I haven't studied it to be sure) that's because
> of write-cached disks...

Personally, I can't remember a case that was caused by something other
than bad RAM or bad disk.

Let me write up a section in the manual on this for 8.1, and link it to
the wal_sync_method documentation section, and see how it looks. Even
re-ordering the items in the docs and making bullets has made it clearer
to me what is happening, and what is the default.

--
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 2005-08-09 14:58:56 Re: FW: [VulnWatch] [AppSecInc Advisory MYSQL05-V0003] Multiple Issues with MySQL User Defined Functions
Previous Message Magnus Hagander 2005-08-09 14:56:32 Re: Simplifying wal_sync_method