Hello hackers! This patch contains LWLocks changes from pg_stat_activity thread and I think it deserves a separate thread. The goal is to split LWLocks from one array to logical pieces (with separate tranches) for better monitoring and debug purposes. Each type of LWLock will have its own tranche and a associated name. I fixed problems with EXEC_BACKEND. Another parts require a some discussion so I didn't touch them yet.
The idea to create an individual tranches for individual LWLocks have come from Heikki Linnakangas and I also think that tranche is a good place to keep LWLock name. Base of these tranches points to MainLWLockArray and T_ID macros keeps the old behavior for them. But I don't insist on the current implementation here. |
lwlock_tranches_refactor.patch
Description: Binary data