On Tue, 25 Aug 2026 at 00:43, Andres Freund <[email protected]> wrote: > > On 2026-08-25 00:27:27 +1200, David Rowley wrote: > > The changes I made in the memory context code are a little strange as we > > only compile those functions in MEMORY_CONTEXT_CHECKING builds. I suspect > > these are WARNINGs today rather than ERRORs so we get a full damage report > > rather than just the first one. > > Maybe, and I wouldn't be against emitting WARNINGs for anything we found and > then PANICing. But just carrying on with a WARNING continues to makes me feel > insane, 15+ years in.
I guess we could PANIC at the end of the context checking functions if we got > 0 WARNINGS, but how much more informative is that over just doing a PANIC if *any* of the checks fail? Do we really need the full list of issues? Maybe we could have a cassert GUC like bool panic_on_bug_warning, then give BUG_WARNING a distinct number and add USE_ASSERT_CHECKING code to errstart() to promote BUG_WARNIGNs to PANICs when that GUC is true or set them to WARNING when false. We could then modify the TAP test to always set panic_on_bug_warning to true. David
