public inbox for [email protected]
help / color / mirror / Atom feedFrom: Thomas Munro <[email protected]>
To: [email protected]
Subject: pgsql: Add file_extend_method=posix_fallocate,write_zeros.
Date: Fri, 06 Feb 2026 05:10:04 +0000
Message-ID: <[email protected]> (raw)
Add file_extend_method=posix_fallocate,write_zeros.
Provide a way to disable the use of posix_fallocate() for relation
files. It was introduced by commit 4d330a61bb1. The new setting
file_extend_method=write_zeros can be used as a workaround for problems
reported from the field:
* BTRFS compression is disabled by the use of posix_fallocate()
* XFS could produce spurious ENOSPC errors in some Linux kernel
versions, though that problem is reported to have been fixed
The default is file_extend_method=posix_fallocate if available, as
before. The write_zeros option is similar to PostgreSQL < 16, except
that now it's multi-block.
Backpatch-through: 16
Reviewed-by: Jakub Wartak <[email protected]>
Reported-by: Dimitrios Apostolou <[email protected]>
Discussion: https://postgr.es/m/b1843124-fd22-e279-a31f-252dffb6fbf2%40gmx.net
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f94e9141a0bbb365f8194517e142746466ee7014
Modified Files
--------------
doc/src/sgml/config.sgml | 37 +++++++++++++++++++++++++++
src/backend/storage/file/fd.c | 3 +++
src/backend/storage/smgr/md.c | 21 +++++++++++----
src/backend/utils/misc/guc_parameters.dat | 7 +++++
src/backend/utils/misc/guc_tables.c | 9 +++++++
src/backend/utils/misc/postgresql.conf.sample | 4 +++
src/include/storage/fd.h | 11 ++++++++
7 files changed, 87 insertions(+), 5 deletions(-)
view thread (10+ 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]
Subject: Re: pgsql: Add file_extend_method=posix_fallocate,write_zeros.
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