Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-19 Thread Tom Lane
Magnus Hagander writes: > On Tue, Nov 16, 2010 at 16:23, Tom Lane wrote: >> What's not clear to me is whether the section title means that only >> certain handles have this guarantee, and if so whether we have to worry >> about running into ones that don't. > I think it is pretty clear it does -

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-19 Thread Tom Lane
Magnus Hagander writes: > On Tue, Nov 16, 2010 at 11:01, Magnus Hagander wrote: >> So yes, it looks completely broken. I guess Windows doesn't actually >> *assign* you a handle larger than 2^32 until you actually ahve that >> many open handles. Typical values on my test system (win64) comes out >

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-19 Thread Tom Lane
Dave Page writes: > On Tue, Nov 16, 2010 at 10:01 AM, Magnus Hagander wrote: >> On Tue, Nov 16, 2010 at 01:35, Tom Lane wrote: >>> BTW, it seems like it'd be a good thing if we had a Win64 machine in the >>> buildfarm. >> Yes. I actually thought we had one. Dave, weren't you going to set one up

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-17 Thread Tom Lane
Magnus Hagander writes: > Do you still have a reference to the page that said they will never be > assigned that high? http://msdn.microsoft.com/en-us/library/ms810720.aspx which says USER and GDI handles are sign extended 32b values To facilitate the porting, a decision has been m

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 16:35, Tom Lane wrote: > Magnus Hagander writes: >> On Tue, Nov 16, 2010 at 16:23, Tom Lane wrote: >>> What's not clear to me is whether the section title means that only >>> certain handles have this guarantee, and if so whether we have to worry >>> about running into on

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 16:23, Tom Lane wrote: > Magnus Hagander writes: >> Do you still have a reference to the page that said they will never be >> assigned that high? > > http://msdn.microsoft.com/en-us/library/ms810720.aspx > > which says > >    USER and GDI handles are sign extended 32b valu

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 15:42, Tom Lane wrote: > Magnus Hagander writes: >> On Tue, Nov 16, 2010 at 11:01, Magnus Hagander wrote: >>> So yes, it looks completely broken. I guess Windows doesn't actually >>> *assign* you a handle larger than 2^32 until you actually ahve that >>> many open handles

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 11:01, Magnus Hagander wrote: > On Tue, Nov 16, 2010 at 01:35, Tom Lane wrote: >> ... and if so, isn't postmaster.c's code to transfer a HANDLE value to a >> child process all wet? > > It is definitely 64-bit. sizeof(HANDLE)==8. > > So yes, it looks completely broken. I gu

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Dave Page
On Tue, Nov 16, 2010 at 10:01 AM, Magnus Hagander wrote: > On Tue, Nov 16, 2010 at 01:35, Tom Lane wrote: >> ... and if so, isn't postmaster.c's code to transfer a HANDLE value to a >> child process all wet? > > It is definitely 64-bit. sizeof(HANDLE)==8. > > So yes, it looks completely broken. I

Re: [HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-16 Thread Magnus Hagander
On Tue, Nov 16, 2010 at 01:35, Tom Lane wrote: > ... and if so, isn't postmaster.c's code to transfer a HANDLE value to a > child process all wet? It is definitely 64-bit. sizeof(HANDLE)==8. So yes, it looks completely broken. I guess Windows doesn't actually *assign* you a handle larger than 2^

[HACKERS] Isn't HANDLE 64 bits on Win64?

2010-11-15 Thread Tom Lane
... and if so, isn't postmaster.c's code to transfer a HANDLE value to a child process all wet? sprintf(paramHandleStr, "%lu", (DWORD) paramHandle); ... paramHandle = (HANDLE) atol(id); BTW, it seems like it'd be a good thing if we had a Win64 machine in the buildfarm.