make LWLockCounter a global variable - Mailing list pgsql-hackers

From Nathan Bossart
Subject make LWLockCounter a global variable
Date
Msg-id aLDLnan9gNCS9fHx@nathan
Whole thread Raw
Responses Re: make LWLockCounter a global variable
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt
Next
From: Alvaro Herrera
Date:
Subject: Re: Adding REPACK [concurrently]