| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: pg_preadv() and pg_pwritev() |
| Date: | 2020-12-20 07:07:24 |
| Message-ID: | 359768.1608448044@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Thomas Munro <thomas(dot)munro(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joel Jacobson | 2020-12-20 07:33:38 | Re: Weird special case in jsonb_concat() |
| Previous Message | Pavel Stehule | 2020-12-20 07:04:04 | Re: On login trigger: take three |