Re: Latches vs lwlock contention
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Thomas Munro <thomas.munro@gmail.com>, vignesh C <vignesh21@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Yura Sokolov <y.sokolov@postgrespro.ru>, Andres Freund <andres@anarazel.de>
Date: 2023-07-06T09:58:09Z
Lists: pgsql-hackers
On 04.03.23 20:50, Thomas Munro wrote: > Subject: [PATCH v3 1/6] Allow palloc_extended(NO_OOM) in critical sections. > > Commit 4a170ee9e0e banned palloc() and similar in critical sections, because an > allocation failure would produce a panic. Make an exception for allocation > with NULL on failure, for code that has a backup plan. I suppose this assumes that out of memory is the only possible error condition that we are concerned about for this? For example, we sometimes see "invalid memory alloc request size" either because of corrupted data or because code does things we didn't expect. This would then possibly panic? Also, the realloc code paths potentially do more work with possibly more error conditions, and/or they error out right away because it's not supported by the context type. Maybe this is all ok, but it would be good to make the assumptions more explicit.
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