Re: AssertLog instead of Assert in some places - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: AssertLog instead of Assert in some places
Date
Msg-id CAExHW5sSudEJY-FnFyphhwo1wBvOekhwhsvP1eanyymejoZGsA@mail.gmail.com
Whole thread Raw
In response to Re: AssertLog instead of Assert in some places  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Fri, Aug 11, 2023 at 11:27 PM Andres Freund <andres@anarazel.de> wrote:
> >
> > Attached patch combines Assert and elog(ERROR, ) so that when an
> > Assert is triggered in assert-enabled binary, it will throw an error
> > while keeping the backend intact. Thus it does not affect gdb session
> > or psql session. These elogs do not make their way to non-assert
> > binary so do not make it to production like Assert.
>
> I am quite strongly against this. This will lead to assertions being hit in
> tests without that being noticed, e.g. because they happen in a background
> process that just restarts.

Fair point. Our regression doesn't check server error logs for
unwanted errors. How about restricting it to only client backends? I
don't know how to identify those from others but there must be a way.

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Yugo NAGATA
Date:
Subject: Re: Make psql's qeury canceling test simple by using signal() routine of IPC::Run
Next
From: Ashutosh Bapat
Date:
Subject: Re: AssertLog instead of Assert in some places