From: | Victor Wagner <vitus(at)wagner(dot)pp(dot)ru> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Use pread and pwrite instead of lseek + write and read |
Date: | 2016-08-17 11:03:01 |
Message-ID: | 20160817140301.4fd397d2@fafnir.local.vm |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 17 Aug 2016 12:17:35 +0200
Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Wed, Aug 17, 2016 at 11:34 AM, Victor Wagner <vitus(at)wagner(dot)pp(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2016-08-17 11:19:54 | Re: Why we lost Uber as a user |
Previous Message | Magnus Hagander | 2016-08-17 10:47:07 | Re: Use pread and pwrite instead of lseek + write and read |