Re: [PING] fallocate() causes btrfs to never compress postgresql files

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: [PING] fallocate() causes btrfs to never compress postgresql files
Дата
Msg-id CA+hUKGLib4Wo9n637HCq2BvOrczwvzReGTHWdyYKn6_KXUP2ag@mail.gmail.com
обсуждение исходный текст
Ответ на [PING] fallocate() causes btrfs to never compress postgresql files  (Dimitrios Apostolou <jimis@gmx.net>)
Список pgsql-hackers
On Tue, Jun 3, 2025 at 1:58 AM Dimitrios Apostolou <jimis@gmx.net> wrote:
> This sounds like the best solution IMO. People can then experiment with
> different settings and filesystems, and that way we also learn in the
> process. Thank you for the effort and patches so far.

OK, here's a basic patch to experiment with.  You can set:

file_extend_method = fallocate,ftruncate,write
file_extend_method_threshold = 8 # (below 8 always write, 0 means never write)

To really make COPY fly we also need to get write combining and AIO
going (we've had this working with various prototypes, but it all
missed the boat for v18 which can only do that stuff for reads).  Then
you'll have concurrent 128kB or up to 1MB writes trundling along in
the background which I guess should work pretty nicely for stuff like
BTRFS/ZFS and compression and all that jazz.

Вложения

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