Re: x206-x225

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
Cc: PFC <lists(at)peufeu(dot)com>, David Lang <david(at)lang(dot)hm>, Richard Huxton <dev(at)archonet(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: x206-x225
Date: 2006-03-11 16:59:29
Message-ID: 28030.1142096369@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> writes:
> I assume that for PostgreSQL "written to disk" is after fsync returned
> successfully. In practice that could very well mean that the data is
> still in a cache somewhere (controller or harddisk, not in the OS
> anymore, see also man page of fsync)

What it had better mean, if you want your database to be reliable,
is that the data is stored someplace that will survive a system crash
(power outage, kernel panic, etc). A battery-backed RAM cache is OK,
assuming that total failure of the RAID controller is not one of the
events you consider likely enough to need protection against.

The description of your SATA drive makes it sound like the drive
does not put data on the platter before reporting "write complete",
but only stores it in on-board RAM cache. It is highly unlikely
that there is any battery backing for that cache, and therefore that
drive is not to be trusted.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Joost Kraaijeveld 2006-03-11 18:26:36 Re: x206-x225
Previous Message Joost Kraaijeveld 2006-03-11 14:26:14 Re: x206-x225