On Fri, Oct 28, 2022 at 4:56 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > See attached sketch patches. I guess the main thing that may not be > good enough is the use of a fixed sized latch buffer. Memory > allocation in don't-throw-here environments like the guts of lock code > might be an issue, which is why it just gives up and flushes when > full; maybe it should try to allocate and fall back to flushing only > if that fails.
Here's an attempt at that. There aren't actually any cases of uses of this stuff in critical sections here, so perhaps I shouldn't bother with that part. The part I'd most like some feedback on is the heavyweight lock bits. I'll add this to the commitfest.
v2-0001-Allow-palloc_extended-NO_OOM-in-critical-sections.patch
Description: Binary data
v2-0002-Provide-SetLatches-for-batched-deferred-latches.patch
Description: Binary data
v2-0003-Use-SetLatches-for-condition-variables.patch
Description: Binary data
v2-0004-Use-SetLatches-for-heavyweight-locks.patch
Description: Binary data
v2-0005-Don-t-re-acquire-LockManager-partition-lock-after.patch
Description: Binary data
v2-0006-Use-SetLatches-for-SERIALIZABLE-DEFERRABLE-wakeup.patch
Description: Binary data
v2-0007-Use-SetLatches-for-synchronous-replication-wakeup.patch
Description: Binary data