Re: LWLock/ShmemIndex startup question - Mailing list pgsql-hackers

From Claudio Natoli
Subject Re: LWLock/ShmemIndex startup question
Date
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F259@harris.memetrics.local
Whole thread Raw
In response to LWLock/ShmemIndex startup question  (Claudio Natoli <claudio.natoli@memetrics.com>)
Responses Re: LWLock/ShmemIndex startup question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane writes:
> > Just working with what we've already got. There seems to be very 
> > usable code in src/backend/port/win32/sema.c, which gets invoked 
> > as Win32 does not have spin-locks, but unfortunately relies on 
> > ShmemInitStruct.
>
> Win32 certainly has spinlocks; it does not run on any hardware for which
> we don't have spinlock assembler.  For that matter, doesn't it have
> POSIX-compatible semaphores?  I'm not sure there's any need for
> src/backend/port/win32/sema.c at all.

["as Win32 does not have" should have been read as "as Postgres Win32 does
not have"]

I'll have a look at how we could fit in spinlock code for Win32, or at
least, using the Win32 semaphores. (Do you have any idea on the historical
context of this code? I wondered as to, if we have no win32 port, why there
would be a seemingly good-to-go sema replacement?)

No chance on getting the Shmem bootrap rearrangement past you, as described
in my earlier mail? IMNSHO, it is not entirely without merit.

Cheers,
Claudio



--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: LWLock/ShmemIndex startup question
Next
From: Tom Lane
Date:
Subject: Re: LWLock/ShmemIndex startup question