Neil Conway <[EMAIL PROTECTED]> writes: > Why did you change ShmemIndexLock from an LWLock to a spinlock?
That one I can answer --- it's a bootstrapping issue: we can't use LWLocks until we have a PGProc (*MyProc), and we can't set that up without looking in the ShmemIndex for the related data structures. So ShmemIndex needs to use a more primitive lock type. This is actually the way the code used to do it; I changed the lock type when the opportunity presented itself, but if we're going to support fork/exec again then we have to go back to how it was done before. Your other comments seem pretty germane to me, except for > I wonder whether it is cleaner to make these properly public, rather > than using the NON_EXEC_STATIC #ifdef... (I'm not necessarily saying > it is, I'm just tossing it out there). I don't want to make these things public, because we don't really want any other modules accessing them. NON_EXEC_STATIC is pretty ugly, but it does guarantee that we will soon find out about any unintended cross-module references, because they won't compile on Unix systems. If you've got an idea about a cleaner way to do it, I'm all ears ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend