Re: WAL and commit_delay - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: WAL and commit_delay
Date
Msg-id 200102172050.PAA03213@candle.pha.pa.us
Whole thread Raw
In response to Re: WAL and commit_delay  (Larry Rosenman <ler@lerctr.org>)
Responses Re: WAL and commit_delay  (Larry Rosenman <ler@lerctr.org>)
List pgsql-hackers
> * Bruce Momjian <pgman@candle.pha.pa.us> [010217 14:46]:
> > > Right now the WAL preallocation code (XLogFileInit) is not good enough
> > > because it does lseek to the 16MB position and then writes 1 byte there.
> > > On an implementation that supports holes in files (which is most Unixen)
> > > that doesn't cause physical allocation of the intervening space.  We'd
> > > have to actually write zeroes into all 16MB to ensure the space is
> > > allocated ... but that's just a couple more lines of code.
> > 
> > Are OS's smart enough to not allocate zero-written blocks?  Do we need
> > to write non-zeros?
> I don't believe so.  writing Zeros is valid.  

The reason I ask is because I know you get zeros when trying to read
data from a file with holes, so it seems some OS could actually drop
those blocks from storage.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: WAL and commit_delay
Next
From: Larry Rosenman
Date:
Subject: Re: WAL and commit_delay