Re: Support a wildcard in backtrace_functions

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: Support a wildcard in backtrace_functions
Date: 2024-03-08 13:41:52
Message-ID: F5DB9BE4-1796-4972-BD2A-211571C86F58@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 8 Mar 2024, at 12:25, Jelte Fennema-Nio <me(at)jeltef(dot)nl> wrote:
>
> On Fri, 8 Mar 2024 at 10:59, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>>
>> On 2024-Mar-08, Bharath Rupireddy wrote:
>>
>>> This works only if '* 'is specified as the only one character in
>>> backtrace_functions = '*', right? If yes, what if someone sets
>>> backtrace_functions = 'foo, bar, *, baz'?
>>
>> It throws an error, as expected. This is a useless waste of resources:
>> checking for "foo" and "bar" is pointless, since the * is going to give
>> a positive match anyway. And the "baz" is a waste of memory which is
>> never going to be checked.
>
> Makes sense. Attached is a new patchset that implements it that way.

This version address the concerns raised by Alvaro, and even simplifies the
code over earlier revisions. My documentation comments from upthread still
stands, but other than those this version LGTM.

> I've not included Bharath his 0003 patch, since it's a much bigger
> change than the others, and thus might need some more discussion.

Agreed.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-03-08 13:49:47 Re: Confine vacuum skip logic to lazy_scan_skip
Previous Message Ronan Dunklau 2024-03-08 13:40:00 Re: Failures in constraints regression test, "read only 0 of 8192 bytes"