"Vadim Mikheev" <vmikheev@sectorbase.com> writes:
> I see that seek+write was changed to write-s in XLogFileInit
> (that was induced by subj, right?), but what about problem
> itself?
> BTW, were performance tests run after seek+write --> write-s
> change?
That change was for safety, not for performance. It might be a
performance win on systems that support fdatasync properly (because it
lets us use fdatasync), otherwise it's probably not a performance win.
But we need it regardless --- if you didn't want a fully-allocated WAL
file, why'd you bother with the original seek-and-write-1-byte code?
regards, tom lane