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-30T22:11:48Z
Lists: pgsql-hackers
Attachments
- 0001-Log-a-warning-about-io_direct-at-startup-time.patch (text/x-patch) patch 0001
On Sun, Apr 30, 2023 at 6:35 PM Thomas Munro <thomas.munro@gmail.com> wrote: > 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? Something like this? Better words welcome. $ ~/install//bin/postgres -D pgdata -c io_direct=data 2023-05-01 09:44:37.460 NZST [99675] LOG: starting PostgreSQL 16devel on x86_64-unknown-freebsd13.2, compiled by FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c), 64-bit 2023-05-01 09:44:37.460 NZST [99675] LOG: listening on IPv6 address "::1", port 5432 2023-05-01 09:44:37.460 NZST [99675] LOG: listening on IPv4 address "127.0.0.1", port 5432 2023-05-01 09:44:37.461 NZST [99675] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2023-05-01 09:44:37.463 NZST [99675] WARNING: io_direct is an experimental setting for developer testing only 2023-05-01 09:44:37.463 NZST [99675] HINT: File I/O may be inefficient or not work on some file systems. 2023-05-01 09:44:37.465 NZST [99678] LOG: database system was shut down at 2023-05-01 09:43:51 NZST 2023-05-01 09:44:37.468 NZST [99675] LOG: database system is ready to accept connections
Commits
-
Rename hook functions for debug_io_direct to match variable name.
- 155c81463c26 16.0 landed
- 4f3514f201cf 17.0 landed
-
Rename io_direct to debug_io_direct.
- 319bae9a8da6 16.0 landed
-
Skip the 004_io_direct.pl test if a pre-flight check fails.
- 6ca8df2d6147 16.0 landed
-
Use higher wal_level for 004_io_direct.pl.
- 980e8879f54a 16.0 landed
-
Skip \password TAP test on old IPC::Run versions
- 2e57ffe12f6b 16.0 cited
-
Add io_direct setting (developer-only).
- d4e71df6d757 16.0 landed
-
Introduce PG_IO_ALIGN_SIZE and align all I/O buffers.
- faeedbcefd40 16.0 landed
-
Add palloc_aligned() to allow aligned memory allocations
- 439f61757f05 16.0 cited
-
initdb: When running CREATE DATABASE, use STRATEGY = WAL_COPY.
- ad43a413c4f7 15.0 cited