Re: Support a wildcard in backtrace_functions

From: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, 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 11:25:28
Message-ID: CAGECzQTRzy5PSz__7=Q0GYDcYgdTY34fqVu2fAP+A4Sq79C9sg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
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.

Attachment Content-Type Size
v5-0002-Add-wildcard-support-to-backtrace_functions-GUC.patch application/octet-stream 2.0 KB
v5-0001-Add-backtrace_functions_min_level.patch application/octet-stream 6.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-03-08 11:47:15 Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Previous Message Dean Rasheed 2024-03-08 11:18:41 Re: Dump-restore loosing 'attnotnull' bit for DEFERRABLE PRIMARY KEY column(s).