public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dimitrios Apostolou <[email protected]>
To: Thomas Munro <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: [email protected]
Cc: Andres Freund <[email protected]>
Cc: Melanie Plageman <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Kyotaro Horiguchi <[email protected]>
Cc: David Rowley <[email protected]>
Subject: Re: [PING] fallocate() causes btrfs to never compress postgresql files
Date: Thu, 12 Jun 2025 14:41:18 +0200 (CEST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+hUKGLib4Wo9n637HCq2BvOrczwvzReGTHWdyYKn6_KXUP2ag@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<[email protected]>
<CA+hUKGJeO8xF5JBiRwc5onCrmthkhoeY0RC538v5vLd7c4s_LQ@mail.gmail.com>
<CA+hUKGL6V2Xsp7D1=sqwAesyPfB-Mt+aF1qDqXUPPfrFf72Lng@mail.gmail.com>
<[email protected]>
<CA+hUKGJT+jczya=2s4D4GYXVWOFJ-qAkJDkjVPk-PAbqNL3x9A@mail.gmail.com>
<[email protected]>
<CA+hUKGLib4Wo9n637HCq2BvOrczwvzReGTHWdyYKn6_KXUP2ag@mail.gmail.com>
On Mon, 9 Jun 2025, Thomas Munro wrote:
> On Tue, Jun 3, 2025 at 1:58 AM Dimitrios Apostolou <[email protected]> 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)
>
I applied the patch on PostgreSQL v17 and am testing it now. I chose
ftruncate method and I see ftruncate in action using strace while doing
pg_restore of a big database. Nothing unexpected has happened so far. I
also verified that files are being compressed, obeying Btrfs's mount
option compress=zstd.
Thanks for the patch! What are the odds of commiting it to v17?
Dimitris
view thread (30+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [PING] fallocate() causes btrfs to never compress postgresql files
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox