pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Provide vectored variants of FileRead() and FileWrite().
Date: Tue, 12 Dec 2023 00:15:55 +0000
Message-ID: <E1rCqRH-009l2q-8U@gemulon.postgresql.org> (raw)

Provide vectored variants of FileRead() and FileWrite().

FileReadV() and FileWriteV() adapt pg_preadv() and pg_pwritev() for
fd.c's virtual file descriptors.  The simple FileRead() and FileWrite()
functions are now implemented in terms of the vectored functions, to
avoid code duplication, and they are converted back to the corresponding
simple system calls further down (commit 15c9ac36).  Later work will
make more interesting multi-iovec calls.

The traditional behavior of reporting a "fake" ENOSPC error is
simplified.  It's now always set for non-failing writes, for the benefit
of callers that expect to log a meaningful "%m" if they determine that
the write was short.  (Perhaps we should consider getting rid of that
expectation one day.)

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://postgr.es/m/CA+hUKGJkOiOCa+mag4BF+zHo7qo=o9CFheB8=g6uT5TUm2gkvA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/871fe4917e1e92304bdcc2ab779de7416492c6de

Modified Files
--------------
src/backend/storage/file/fd.c | 43 +++++++++++++++++++++++++------------------
src/include/storage/fd.h      | 32 +++++++++++++++++++++++++++++---
2 files changed, 54 insertions(+), 21 deletions(-)



Message-ID: <E1rCqRH-009l2q-8U@gemulon.postgresql.org>
Permalink:  ../E1rCqRH-009l2q-8U@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rCqRH-009l2q-8U@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Provide vectored variants of FileRead() and FileWrite().
  In-Reply-To: <E1rCqRH-009l2q-8U@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox