On Sun, 18 Feb 2001, Tom Lane wrote:
> I think that there may be a performance advantage to pre-filling the
> logfile even so, assuming that file allocation info is stored in a
> Berkeley/McKusik-like fashion (note: I have no idea what ext2 or
> reiserfs actually do).
ext2 is a lot like [UF]FS. reiserfs is very different, but does
have similar hole semantics.
BTW, I have attached two patches which streamline log initialisation
a little. The first (xlog-sendfile.diff) adds support for Linux's
sendfile system call. FreeBSD and HP/UX have sendfile() too, but the
prototype is different. If it's interesting, someone will have to
come up with a configure test, as autoconf scares me.
The second removes a further three syscalls from the log init path.
There are a couple of things to note here:* I don't know why link/unlink is currently preferred over rename. POSIX
offersstrong guarantees on the semantics of the latter.* I have assumed that the close/rename/reopen stuff is only
therefor the benefit of Windows users, and ifdeffed it for everyone else.
Matthew.