Re: Support a wildcard in backtrace_functions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jelte Fennema-Nio <me(at)jeltef(dot)nl>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support a wildcard in backtrace_functions
Date: 2024-04-23 05:05:03
Message-ID: ZidBfwbekQkW2PHq@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 22, 2024 at 09:25:15AM -0400, Robert Haas wrote:
> That's long been my feeling about this. So, if we revert this for now,
> what we ought to do is put it back right ASAP after feature freeze and
> then clean all that up.

In the 85 backtraces I can find in the tests, we have a mixed bag of:
- Code paths that use the internal errcode, but should not.
- Code paths that use the internal errcode, and are OK with that in
the scope of the tests.
- Code paths that use the internal errcode, though the coding
assumptions behind their use feels fuzzy to me, like amcheck for some
SQL tests or satisfies_hash_partition() in one SQL test.

As cleaning up that is a separate topic, I have begun a new thread and
with a full analysis of everything I've spotted. See here:
https://www.postgresql.org/message-id/Zic_GNgos5sMxKoa@paquier.xyz

The first class of issues refers to real problems, and should be
assigned errcodes. Having a way to switch the backtraces off can have
some benefits in the second cases. However, even if we silence them,
it would also mean to miss backtraces that could be legit. The third
cases would require a different analysis, behind the designs of the
code paths able to trigger the internal codes.

At this stage, my opinion would tend in favor of a revert of the GUC.
The second class of cases is useful to stress many unexpected cases,
and I don't expect this number to go down over time, but increase with
more advanced tests added into core (I/O failures with partial writes
for availability, etc).
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sutou Kouhei 2024-04-23 05:14:55 Is it acceptable making COPY format extendable?
Previous Message Bertrand Drouvot 2024-04-23 04:59:09 Re: Avoid orphaned objects dependencies, take 3