Re: Use pread and pwrite instead of lseek + write and read

Поиск
Список
Период
Сортировка
От Victor Wagner
Тема Re: Use pread and pwrite instead of lseek + write and read
Дата
Msg-id 20160817140301.4fd397d2@fafnir.local.vm
обсуждение исходный текст
Ответ на Re: Use pread and pwrite instead of lseek + write and read  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On Wed, 17 Aug 2016 12:17:35 +0200
Magnus Hagander <magnus@hagander.net> wrote:

> On Wed, Aug 17, 2016 at 11:34 AM, Victor Wagner <vitus@wagner.pp.ru>
> wrote:

> > I don't think that all platforms, supported by PostgreSQL support
> > this API. Especially, I cannot find any mention of pread/pwrite in
> > the Win32 except this thread on stackoverflow:
> >
> >  
> Yeah, Windows does not have those API calls, but it shouldn't be
> rocket science to write a wrapper for it. The standard windows APIs
> can do the same thing -- but they'll need access to the HANDLE for
> the file and not the posix file descriptor.

There is _get_osfhandle function, which allows to find out Windows
HANDLE associated with posix file descriptor.

Really my question was - someone should write these wrappers into
src/port and add corresponding test to the configure and/or CMakefile 
for this patch to be complete.






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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Use pread and pwrite instead of lseek + write and read
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Why we lost Uber as a user