Re: [PATCH] Avoid pallocs in async.c's SignalBackends critical section

2025-11-25 Thread Joel Jacobson
On Mon, Nov 24, 2025, at 22:53, Joel Jacobson wrote: > On Mon, Nov 24, 2025, at 17:06, Tom Lane wrote: >> Unfortunately, releasing locks, sending notifies, etc is not all >> that "noncritical" if you want the DB to keep functioning well. >> But there's a good deal of code in there and making it all

Re: [PATCH] Avoid pallocs in async.c's SignalBackends critical section

2025-11-24 Thread Joel Jacobson
On Mon, Nov 24, 2025, at 17:06, Tom Lane wrote: > I don't think Joel did anybody any favors by separating this patch > fragment from its larger context [1]. I'm a bit surprised by this. My intention in splitting it out was based on earlier advice in [1] that I think made a lot of sense: >> [...my

Re: [PATCH] Avoid pallocs in async.c's SignalBackends critical section

2025-11-24 Thread Tom Lane
Heikki Linnakangas writes: > On 23/11/2025 16:45, Joel Jacobson wrote: >> This patch addresses this comment in async.c's SignalBackends: >> * XXX in principle these pallocs could fail, which would be bad. >> * Maybe preallocate the arrays? They're not that large, though. > Ugh. I wonder if we sh

Re: [PATCH] Avoid pallocs in async.c's SignalBackends critical section

2025-11-24 Thread Heikki Linnakangas
On 23/11/2025 16:45, Joel Jacobson wrote: Hi hackers, This patch addresses this comment in async.c's SignalBackends: * XXX in principle these pallocs could fail, which would be bad. * Maybe preallocate the arrays? They're not that large, though. This is unsafe, since AtCommit_Notify

[PATCH] Avoid pallocs in async.c's SignalBackends critical section

2025-11-23 Thread Joel Jacobson
Hi hackers, This patch addresses this comment in async.c's SignalBackends: * XXX in principle these pallocs could fail, which would be bad. * Maybe preallocate the arrays? They're not that large, though. This is unsafe, since AtCommit_Notify effectively runs in a critical section, so an