Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru> writes:
> I think that rename can help a little bit. At least on some FS it is
> atomic operation.
Writing a single sector ought to be atomic too. I'm very skeptical that
it'll be an improvement to just move the risk from one filesystem
operation to another; especially not to one where there's not even a
terribly portable way to request fsync.
regards, tom lane