Re: Latches vs lwlock contention
Maxim Orlov <orlovmg@gmail.com>
From: Maxim Orlov <orlovmg@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Thomas Munro <thomas.munro@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>, Yura Sokolov <y.sokolov@postgrespro.ru>, Andres Freund <andres@anarazel.de>
Date: 2024-09-10T16:53:02Z
Lists: pgsql-hackers
Attachments
- v5-0004-Move-TRACE-calls-into-WaitOnLock.patch (application/octet-stream) patch v5-0004
- v5-0001-Remove-LOCK_PRINT-call-that-could-point-to-garbag.patch (application/octet-stream) patch v5-0001
- v5-0003-Set-MyProc-heldLocks-in-ProcSleep.patch (application/octet-stream) patch v5-0003
- v5-0005-Remove-redundant-lockAwaited-global-variable.patch (application/octet-stream) patch v5-0005
- v5-0002-Fix-comment-in-LockReleaseAll-on-when-locallock-n.patch (application/octet-stream) patch v5-0002
- v5-0007-Release-partition-lock-a-little-earlier.patch (application/octet-stream) patch v5-0007
- v5-0006-Update-local-lock-table-in-ProcSleep-s-caller.patch (application/octet-stream) patch v5-0006
- v5-0008-Split-ProcSleep-function-into-JoinWaitQueue-and-P.patch (application/octet-stream) patch v5-0008
I looked at the patch set and found it quite useful. The first 7 patches are just refactoring and may be committed separately if needed. There were minor problems: patch #5 don't want to apply clearly and the #8 is complained about partitionLock is unused if we build without asserts. So, I add a PG_USED_FOR_ASSERTS_ONLY to solve the last issue. Again, overall patch looks good and seems useful to me. Here is the rebased v5 version based on Heikki's patch set above. -- Best regards, Maxim Orlov.
Commits
-
Fix crash if LockErrorCleanup() is called twice
- 51a0382e8d87 18.0 landed
-
Split ProcSleep function into JoinWaitQueue and ProcSleep
- 3c0fd64fec8e 18.0 landed
-
Move TRACE calls into WaitOnLock()
- 6ae0897e4241 18.0 landed
-
Set MyProc->heldLocks in ProcSleep
- 0464f25b6aa1 18.0 landed
-
Fix comment in LockReleaseAll() on when locallock->nLock can be zero
- 1fe0466cf2cb 18.0 landed
-
Allow a no-wait lock acquisition to succeed in more cases.
- 2346df6fc373 17.0 cited
-
Teach planner about more monotonic window functions
- 456fa635a909 16.0 cited