On Fri, Jul 03, 2026 at 08:17:22AM +0530, Ashutosh Bapat wrote:
> An actual subtle problem does exist in check_temp_buffers.  If we set
> NLocBuffer to a non-zero value when LocalBufHash is not initialized,
> it's going to prohibit a change in the GUC. If LocalBufHash allocation
> fails, probably user would like to try again by reducing NLocBuffer.
> The prohibition makes that impossible.
> 
> The other such usage in hashbuild() is fine, since it will allocate
> more space if at all.
> 
> CheckForLocalBufferLeaks() walks the local buffer descriptor array,
> but it's already initialized when NLocBuffer is set.

Sure, now a lot of this code is also shaped with some internal static
routines, so I'm also slightly afraid of some refactorings.  It just
feels like in the long-term setting NLocBuffer earlier makes some of
the assumptions of the code a bit more brittle.  Not a bid deal,
still..
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to