Re: RE: xlog checkpoint depends on sync() ... seems uns afe - Mailing list pgsql-hackers

From Giles Lean
Subject Re: RE: xlog checkpoint depends on sync() ... seems uns afe
Date
Msg-id 22231.984466053@nemeton.com.au
Whole thread Raw
In response to Re: RE: xlog checkpoint depends on sync() ... seems uns afe  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Sounds quite unreliable to me.  Unless there's some interlock ... like,
> say, the second sync not being able to advance past a buffer page that's
> as yet unwritten by the first sync.  But would all Unixen share such a
> strange detail of implementation?

I heard Kirk McKusick tell this story in a 4.4BSD internals class.
His explanation was that having an *operator* type 'sync' three times
provided enough time for the first sync to do the work before the
operator powered the system down or reset it or whatever.

I've not heard of any filesystem implementation where the number of
sync() system calls issued makes a difference, and imagine that any
programmer who has written code to call sync three times has only
heard part of the story. :-)

Regards,

Giles



pgsql-hackers by date:

Previous
From: Doug McNaught
Date:
Subject: Re: RE: xlog checkpoint depends on sync() ... seems uns afe
Next
From: Karel Zak
Date:
Subject: Re: Internationalized error messages