Re: pg_preadv() and pg_pwritev() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_preadv() and pg_pwritev()
Date
Msg-id 359768.1608448044@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_preadv() and pg_pwritev()  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: pg_preadv() and pg_pwritev()
List 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 by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: On login trigger: take three
Next
From: "Joel Jacobson"
Date:
Subject: Re: Weird special case in jsonb_concat()