Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Current Win32 port status

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: [HACKERS] Current Win32 port status
Date: 2003-12-22 15:20:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
Magnus Hagander wrote:

>>Bruce Momjian wrote:
>>>>	* a workable pipe replacement
>>>I don't have 'pipe' mentioned on the win32 patch.  Can you
>>>give details?
>>Yeah you do. The second point under "Problems with select()".
>>Basically, the Win32 call to pipe() returns a file descriptor 
>>which is invalid to pass on to Win32 select() (as it only 
>>takes socket handles).
>>So, we need to replace the select'ing mechanism under Win32 
>>(yech), or write a Win32 pipe() replacement that returns two 
>>socket endpoints (good enough for our purposes), or something else...
>I think you want to be investigating
>WSAEventSelect() and then WaitForMultipleObjectsEx(). 
>WSAEventSelect() claims it needs a WSAEVENT, but according to docs
>otherwhere it should accept a standard event handle on NT+ platforms.
>WaitForMultiple... will accept pipes, events, anything. (The Ex function
>will also allow dispatching of user APCs, see related discussion about

Using a socket or a pair of sockets is a very common practice in porting 
this sort of code from Unix to Windows. IIRC this is what Cygwin does 
under the hood.

That would help to preserve the programming paradigms already in use in 
Postgres. If it proves to be a performance bottleneck then it could be 
revisited, but it seems unlikely.

Tom (rightly) admonished me not long ago that we do not need to use 
every last part of the Unix API in our code. The same goes a fortiori 
for the Windows API, IMNSHO. Minimal disturbance and acceptable 
performance should be the initial goals.



In response to


pgsql-hackers by date

Next:From: Marc G. FournierDate: 2003-12-22 15:27:20
Subject: Re: [COMMITTERS] pgsql-server/doc/src/sgml Tag: REL7_4_STABLE
Previous:From: Tom LaneDate: 2003-12-22 15:12:40
Subject: Re: COPY TABLE TO

pgsql-patches by date

Next:From: Andreas PflugDate: 2003-12-22 15:46:00
Subject: Re: cascading column drop to index predicates
Previous:From: Tom LaneDate: 2003-12-22 14:45:32
Subject: Re: [GENERAL] Temporary tables and miscellaneous schemas

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2003-12-22 15:48:06
Subject: Re: [HACKERS] Current Win32 port status
Previous:From: Merlin MoncureDate: 2003-12-22 15:19:13
Subject: Re: Signals on Win32 (yet again)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group