Re: smgrzeroextend clarification

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: smgrzeroextend clarification
Дата
Msg-id EDFBDEDD-4BC4-4CD9-B2C7-F721FF4D0BE7@anarazel.de
обсуждение исходный текст
Ответ на Re: smgrzeroextend clarification  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Large files for relations
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [PATCHES] Post-special page storage TDE support