Move some code blocks in lock.c and proc.c
Michael Paquier <michael@paquier.xyz>
Move some code blocks in lock.c and proc.c This change will simplify an upcoming change that will introduce lock statistics, reducting code churn. This commit means that we begin to calculate the time it took to acquire a lock after the deadlock check interrupt has run should log_lock_waits be off, when taken in isolation. This is not a performance-critical code path, and note that log_lock_waits is enabled by default since 2aac62be8cbb. Extracted from a larger patch by the same author. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/aIyNxBWFCybgBZBS@ip-10-97-1-34.eu-west-3.compute.internal
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/lmgr/lock.c | modified | +29 −26 |
| src/backend/storage/lmgr/proc.c | modified | +91 −85 |
Discussion
- Adding locks statistics 61 messages · 2025-08-01 → 2026-04-07