| From: | ncm(at)zembu(dot)com (Nathan Myers) |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: WAL and commit_delay |
| Date: | 2001-02-17 23:04:13 |
| Message-ID: | 20010217150413.A16600@store.zembu.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)zembu(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dominic J. Eidson | 2001-02-17 23:05:31 | Re: WAL and commit_delay |
| Previous Message | Tom Lane | 2001-02-17 22:56:19 | Re: WAL and commit_delay |