Re: How to best find unexpected WARNINGs in the TAP tests?

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: How to best find unexpected WARNINGs in the TAP tests?
Date: 2026-08-24 15:26:09
Message-ID: CAApHDvrdF6gz0pmNE+uYQ4yF+cTitWrN66s4i5mXfyT4xgjn0g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 25 Aug 2026 at 00:43, Andres Freund <andres(at)anarazel(dot)de> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-08-24 15:27:54 Re: postgres_fdw: Fix flaky push down FUNCTION RTE test
Previous Message Sami Imseih 2026-08-24 15:12:55 Re: Function scan FDW pushdown