Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?
Date
Msg-id Y18JPEoEQZgOa36p@paquier.xyz
Whole thread Raw
In response to Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On Sun, Oct 30, 2022 at 03:44:32PM +0100, Alvaro Herrera wrote:
> So I'm kinda proposing that we only do the forward struct initialization
> dance when it really saves on things -- in particular, when it helps
> avoid or reduce massive indirect header inclusion.

Sure.

>  extern ssize_t pg_pwritev_with_retry(int fd,
> -                                     const struct iovec *iov,
> +                                     const iovec *iov,
>                                       int iovcnt,
>                                       off_t offset);

However this still needs to be defined as a struct, no?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Maciek Sakrejda
Date:
Subject: Re: warn if GUC set to an invalid shared library
Next
From: Michael Paquier
Date:
Subject: Re: Simplifying our Trap/Assert infrastructure