Re: Direct I/O

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Andrew Dunstan <andrew@dunslane.net>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, Christoph Berg <myon@debian.org>, mikael.kjellstrom@gmail.com, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-04-30T06:35:30Z
Lists: pgsql-hackers
On Sun, Apr 30, 2023 at 4:11 PM Noah Misch <noah@leadboat.com> wrote:
> Speaking of the developer-only status, I find the io_direct name more enticing
> than force_parallel_mode, which PostgreSQL renamed due to overuse from people
> expecting non-developer benefits.  Should this have a name starting with
> debug_?

Hmm, yeah I think people coming from other databases would be tempted
by it.  But, unlike the
please-jam-a-gather-node-on-top-of-the-plan-so-I-can-debug-the-parallel-executor
switch, I think of this thing more like an experimental feature that
is just waiting for more features to make it useful.  What about a
warning message about that at startup if it's on?



Commits

  1. Rename hook functions for debug_io_direct to match variable name.

  2. Rename io_direct to debug_io_direct.

  3. Skip the 004_io_direct.pl test if a pre-flight check fails.

  4. Use higher wal_level for 004_io_direct.pl.

  5. Skip \password TAP test on old IPC::Run versions

  6. Add io_direct setting (developer-only).

  7. Introduce PG_IO_ALIGN_SIZE and align all I/O buffers.

  8. Add palloc_aligned() to allow aligned memory allocations

  9. initdb: When running CREATE DATABASE, use STRATEGY = WAL_COPY.