Re: pg_preadv() and pg_pwritev()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_preadv() and pg_pwritev()
Дата
Msg-id 359768.1608448044@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_preadv() and pg_pwritev()  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: pg_preadv() and pg_pwritev()  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> OK, here's a patch to zero-fill fresh WAL segments with pwritev().
> I'm drawing a blank on trivial candidate uses for preadv(), without
> infrastructure from later patches.

This looks OK to me.  I tried it on prairiedog (has writev and
pwrite but not pwritev) as well as gaur (has only writev).
They seem happy.

One minor thought is that in

+        struct iovec iov[Min(IOV_MAX, 1024)];    /* cap stack space */

it seems like pretty much every use of IOV_MAX would want some
similar cap.  Should we centralize that idea with, say,

#define PG_IOV_MAX  Min(IOV_MAX, 1024)

?  Or will the plausible cap vary across uses?

            regards, tom lane



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: On login trigger: take three
Следующее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Weird special case in jsonb_concat()