public inbox for [email protected]  
help / color / mirror / Atom feed
From: Thomas Munro <[email protected]>
To: Riku Iki <[email protected]>
Cc: [email protected]
Subject: Re: Preallocation changes in Postgresql 16
Date: Fri, 26 Apr 2024 09:25:03 +1200
Message-ID: <CA+hUKGLu-oDokjt=Hyb8cLPTm19s5HZSq0PY-jXBP6-u2cqMEg@mail.gmail.com> (raw)
In-Reply-To: <CAMazQQfp+3f8tD_Q23rCR=O+Jj4jouSRVigbD8OmrTOfHV+8gA@mail.gmail.com>
References: <CAMazQQfp+3f8tD_Q23rCR=O+Jj4jouSRVigbD8OmrTOfHV+8gA@mail.gmail.com>

On Fri, Apr 26, 2024 at 4:37 AM Riku Iki <[email protected]> wrote:
> I am wondering if there were preallocation related changes in PG16, and if it is possible to disable preallocation in PostgreSQL 16?

I have no opinion on the btrfs details, but I was wondering if someone
might show up with a system that doesn't like that change.  Here is a
magic 8, tuned on "some filesystems":

        /*
         * If available and useful, use posix_fallocate() (via
         * FileFallocate()) to extend the relation. That's often more
         * efficient than using write(), as it commonly won't cause the kernel
         * to allocate page cache space for the extended pages.
         *
         * However, we don't use FileFallocate() for small extensions, as it
         * defeats delayed allocation on some filesystems. Not clear where
         * that decision should be made though? For now just use a cutoff of
         * 8, anything between 4 and 8 worked OK in some local testing.
         */
        if (numblocks > 8)

I wonder if it wants to be a GUC.






view thread (4+ 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]
  Subject: Re: Preallocation changes in Postgresql 16
  In-Reply-To: <CA+hUKGLu-oDokjt=Hyb8cLPTm19s5HZSq0PY-jXBP6-u2cqMEg@mail.gmail.com>

* 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