Hi,

I had this question posed to me on IRC and I didn't know the answer.

If all that is needed to ensure integrity is that the WAL is fsynced, 
what is wrong with just going:

wal_sync_method = fsync
fsync = false

??

Chris


Tue, 01 Jun 2004 09:45:34 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
sync vs. fsync question
Christopher Kings-Lynne wrote:
> Hi,
> 
> I had this question posed to me on IRC and I didn't know the answer.
> 
> If all that is needed to ensure integrity is that the WAL is fsynced, 
> what is wrong with just going:
> 
> wal_sync_method = fsync
> fsync = false

wal_sync_method is only used if fsync is true.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Mon, 31 May 2004 21:48:59 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: sync vs. fsync question
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> what is wrong with just going:

> wal_sync_method = fsync
> fsync = false

fsync = false causes wal_sync_method to be ignored.  You get no syncing.

			regards, tom lane

Mon, 31 May 2004 22:23:43 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: sync vs. fsync question 
On 5/31/2004 9:45 PM, Christopher Kings-Lynne wrote:

> Hi,
> 
> I had this question posed to me on IRC and I didn't know the answer.
> 
> If all that is needed to ensure integrity is that the WAL is fsynced, 
> what is wrong with just going:
> 
> wal_sync_method = fsync
> fsync = false

The assumption that WAL is all that is needed to ensure integrity is 
wrong in the first place, unless you are going to keep the WAL forever 
and never recycle the segments. What you're effectively asking for is 
not to checkpoint any more.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


Wed, 02 Jun 2004 10:34:56 -0400
Jan Wieck <JanWieck@Yahoo.com>
Re: sync vs. fsync question