| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> | 
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | make LWLockCounter a global variable | 
| Date: | 2025-08-28 21:35:25 | 
| Message-ID: | aLDLnan9gNCS9fHx@nathan | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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 | Content-Type | Size | 
|---|---|---|
| v1-0001-Make-LWLockCounter-a-global-variable.patch | text/plain | 3.7 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2025-08-28 21:39:49 | Re: Adding REPACK [concurrently] | 
| Previous Message | Álvaro Herrera | 2025-08-28 21:33:42 | Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt |