Re: WAL and commit_delay

Поиск
Список
Период
Сортировка
От ncm@zembu.com (Nathan Myers)
Тема Re: WAL and commit_delay
Дата
Msg-id 20010217150413.A16600@store.zembu.com
обсуждение исходный текст
Ответ на Re: WAL and commit_delay  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Sat, Feb 17, 2001 at 03:45:30PM -0500, Bruce Momjian wrote:
> > 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?  

No, but some disks are.  Writing zeroes is a bit faster on smart disks.
This has no real implications for PG, but it is one of the reasons that 
writing zeroes doesn't really wipe a disk, for forensic purposes.

Nathan Myers
ncm@zembu.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WAL and commit_delay
Следующее
От: "Dominic J. Eidson"
Дата:
Сообщение: Re: WAL and commit_delay