Re: AW: AW: AW: WAL does not recover gracefully from out-of -dis k-sp ace - Mailing list pgsql-hackers

From Ian Lance Taylor
Subject Re: AW: AW: AW: WAL does not recover gracefully from out-of -dis k-sp ace
Date
Msg-id si3dcmbpfl.fsf@daffy.airs.com
Whole thread Raw
In response to AW: AW: AW: WAL does not recover gracefully from out-of -dis k-sp ace  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> We just bought back almost all the system time.  The only possible
> explanation is that this way either doesn't keep the buffers from prior
> blocks, or does not scan them for dirtybits.  I note that the open(2)
> man page is phrased so that O_SYNC is actually defined not to fsync the
> whole file, but only the part you just wrote --- I wonder if it's
> actually implemented that way?

Sure, why not?  That's how it is implemented in the Linux kernel.  If
you do a write with O_SYNC set, the write simply flushes out the
buffers it just modified.  If you call fsync, the kernel has to walk
through all the buffers looking for ones associated with the file in
question.

Ian


pgsql-hackers by date:

Previous
From: Mark Bixby
Date:
Subject: Re: porting question: funky uid names?
Next
From: Kaare Rasmussen
Date:
Subject: Internationalized dates (was Internationalized error messages)