Re: pread() and pwrite()

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: pread() and pwrite()
Дата
Msg-id 6cc7c8dd-29f9-7d75-d18a-99f19c076d10@iki.fi
обсуждение исходный текст
Ответ на Re: pread() and pwrite()  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: pread() and pwrite()
Список pgsql-hackers
On 20/07/18 01:50, Thomas Munro wrote:
> An idea for how to handle Windows, in a follow-up patch: add a file
> src/backend/port/win32/file.c that defines pgwin32_pread() and
> pgwin32_pwrite(), wrapping WriteFile()/ReadFile() and passing in an
> "OVERLAPPED" struct with the offset and sets errno on error, then set
> up the macros so that Windows can use them as pread(), pwrite().  It
> might also be necessary to open all files with FILE_FLAG_OVERLAPPED.
> Does any Windows hacker have a bettter idea, and/or want to try to
> write that patch?  Otherwise I'll eventually try to do some long
> distance hacking on AppVeyor.

No objections, if you want to make the effort. But IMHO the lseek+read 
fallback is good enough on Windows. Unless you were thinking that we 
could then remove the !HAVE_PREAD fallback altogether. Are there any 
other platforms out there that don't have pread/pwrite that we care about?

- Heikki


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

Предыдущее
От: Nikhil Sontakke
Дата:
Сообщение: Re: [HACKERS] logical decoding of two-phase transactions
Следующее
От: Oskari Saarenmaa
Дата:
Сообщение: Re: pread() and pwrite()