Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?
Дата
Msg-id 20230215.102837.668564888299847545.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?
Список pgsql-hackers
At Tue, 14 Feb 2023 16:55:25 -0800, Andres Freund <andres@anarazel.de> wrote in 
> Hi,
> 
> On 2023-02-14 18:00:00 +0530, Bharath Rupireddy wrote:
> > Done, PSA v2 patch.
> 
> This feels way too complicated to me.  How about something more like the
> attached?

I like this one, but the parameters offset and size are in a different
order from pwrite(fd, buf, count, offset).  I perfer the arrangement
suggested by Bharath. And isn't it better to use Min(remaining_size,
BLCKSZ) instead of a bare if statement?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: Improve logging when using Huge Pages