Hi,
On May 12, 2023 11:36:23 AM PDT, Thomas Munro <thomas.munro@gmail.com> wrote:
>Just a thought: should RelationCopyStorageUsingBuffer(), the new code
>used by CREATE DATABASE with the default strategy WAL_LOG, use the
>newer interface so that it creates fully allocated files instead of
>sparse ones?
I played with that, but at least on Linux with ext4 and xfs it was hard to find cases where it really was beneficial.
That'sactually how I ended up finding the issues I'd fixed recently-ish.
I think it might be different if we had an option to not use a strategy for the target database - right now we IIRC
writeback due to ring replacement. Entirely or largely in order, which I think removes most of the issues you could
have.
One issue is that it'd be worse on platforms / filesystems without fallocate support, because we would write the data
backtwice (once with zeros, once the real data). Perhaps we should add a separate parameter controlling the fallback
behaviour.
Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.