In lwlock.c, uses of LWLockCounter must first calculate its address in
shared memory with something like this:
LWLockCounter = (int *) ((char *) MainLWLockArray - sizeof(int));
This appears to have been started by commit 82e861f in order to fix
EXEC_BACKEND builds, but it could also be fixed by adding it to the
BackendParameters struct. I find the current approach somewhat difficult
to read and understand, so I'd like to switch to the latter approach. This
is admittedly just nitpicking...
--
nathan