Re: Direct I/O

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Direct I/O
Дата
Msg-id 20221101133341.GX16921@telsasoft.com
обсуждение исходный текст
Ответ на Direct I/O  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: Direct I/O  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Tue, Nov 01, 2022 at 08:36:18PM +1300, Thomas Munro wrote:
> Hi,
> 
> Here is a patch to allow PostgreSQL to use $SUBJECT.  It is from the
> AIO patch-set[1].  It adds three new settings, defaulting to off:
> 
>   io_data_direct = whether to use O_DIRECT for main data files
>   io_wal_direct = ... for WAL
>   io_wal_init_direct = ... for WAL-file initialisation

You added 3 booleans, but I wonder if it's better to add a string GUC
which is parsed for comma separated strings.  (By "better", I mean
reducing the number of new GUCs - which is less important for developer
GUCs anyway.)

DIO is slower, but not so much that it can't run under CI.  I suggest to
add an 099 commit to enable the feature during development.

Note that this fails under linux with fsanitize=align:
../src/backend/storage/file/buffile.c:117:17: runtime error: member access within misaligned address 0x561a4a8e40f8 for
type'struct BufFile', which requires 4096 byte alignment
 

-- 
Justin



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Privileges on PUBLICATION
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: heavily contended lwlocks with long wait queues scale badly