Re: x206-x225 - Mailing list pgsql-performance

From Tom Lane
Subject Re: x206-x225
Date
Msg-id 28030.1142096369@sss.pgh.pa.us
Whole thread Raw
In response to Re: x206-x225  (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>)
Responses Re: x206-x225  (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>)
List pgsql-performance
Joost Kraaijeveld <J.Kraaijeveld@Askesis.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

pgsql-performance by date:

Previous
From: Joost Kraaijeveld
Date:
Subject: Re: x206-x225
Next
From: Joost Kraaijeveld
Date:
Subject: Re: x206-x225