Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7598C2E009D for ; Sun, 2 Dec 2007 16:59:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40712-08 for ; Sun, 2 Dec 2007 16:58:57 -0400 (AST) Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id 6B01A2E0080 for ; Sun, 2 Dec 2007 16:58:57 -0400 (AST) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id lB2Kwu91007176 for ; Sun, 2 Dec 2007 15:58:56 -0500 (EST) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id lB2Kwu8K007173 for ; Sun, 2 Dec 2007 15:58:56 -0500 (EST) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Sun, 2 Dec 2007 15:58:56 -0500 (EST) From: Greg Smith X-X-Sender: gsmith@westnet.com To: pgsql-general@postgresql.org Subject: Re: full_page_writes = off? In-Reply-To: <20071201121601.GB2552@batory.org.pl> Message-ID: References: <4751150F.8080604@mail.ru> <20071201114754.GA2552@batory.org.pl> <47514DDC.70607@marquesminen.com.ar> <20071201121601.GB2552@batory.org.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/43 X-Sequence-Number: 124788 On Sat, 1 Dec 2007, Tomasz Ostrowski wrote: > You can also use "hdparm -I" to check this - look for a "Write > caching" in "Commands/features" section. If it has a "*" in front > then it is enabled and dangerous. Right; using -I works with most Linux hdparm versions: # hdparm -V hdparm v6.6 # hdparm -I /dev/hda | grep "Write cache" * Write cache # hdparm -W 0 /dev/hda /dev/hda: setting drive write-caching to 0 (off) # hdparm -I /dev/hda | grep "Write cache" Write cache While being able to check the state with -W only works in very recent ones. The best way to make this change permanent varies depending on your Linux distribution. Also: nowadays many SATA disks appear as SCSI devices like /dev/sda. In some cases I believe you can use a recent hdparm on them anyway, in others I've had to use sdparm instead. Several of the examples at http://sg.torque.net/sg/sdparm.html show how to manipulate the Write Cache Enabled (WCE) status similarly to the above on SCSI devices. > I don't know how to check it on BSD. In FreeBSD I believe you use atacontrol to check the settings, and you can make the changes permanent by fiddling with the /boot/device.hints file. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD