Re: Running with fsync=off - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Running with fsync=off
Date
Msg-id 20051222080759.GB21783@svana.org
Whole thread Raw
In response to Running with fsync=off  (Benjamin Arai <barai@cs.ucr.edu>)
Responses Re: [ADMIN] Running with fsync=off  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, Dec 21, 2005 at 11:30:15PM -0800, Benjamin Arai wrote:
> I want to be able to do large updates on an existing backed up database
> with fsync=off but at the end of the updates how do I ensure that the
> data gets synced?

Do you know if that actually makes it much faster? Maybe you're better
off splitting WAL into a seperate disk.

> Somebody said running "sync ; sync; sync" from the console.  This seems
> reasonable but why not just "sync" or is there another command I should
> ruyn after the update either in postgres or the console?

The reason is partly historical. On some OSes running sync only starts
the process but returns immediatly. However, there can only be one sync
at a time so the second sync waits for the first the finish. The third
is just for show. However, on Linux at least the one sync is enough.

Don't you need to restart postgres to change that parameter anyway?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Funky template1 problem?
Next
From: John Sidney-Woollett
Date:
Subject: Mem usage/leak - advice needed