Re: Support a wildcard in backtrace_functions

From: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: 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-03-21 14:41:44
Message-ID: CAGECzQQ-DLdg1s2eYbQNaZBRkfUR_BXaBTuRjBJGcDmvGkpP2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 13 Mar 2024 at 16:32, Jelte Fennema-Nio <me(at)jeltef(dot)nl> wrote:
> How
> about the following aproach. It still uses 3 GUCs, but they now all
> work together. There's one entry point and two additional filters
> (level and function name)
>
> # Says what log entries to log backtraces for
> log_backtrace = {all|internal|none} (default: internal)
>
> # Excludes log entries from log_include_backtrace by level
> backtrace_min_level = {debug4|...|fatal} (default: error)
>
> # Excludes log entries from log_include_backtrace if function name
> # does not match list, but empty string disables this filter (thus
> # logging for all functions)
> backtrace_functions = {...} (default: '')

Attached is a patch that implements this. Since the more I think about
it, the more I like this approach.

Attachment Content-Type Size
v8-0001-Add-PGErrorVerbosity-to-typedefs.list.patch application/octet-stream 1.3 KB
v8-0002-Restructure-backtrace-related-GUCs.patch application/octet-stream 15.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-03-21 14:55:14 Re: BitmapHeapScan streaming read user and prelim refactoring
Previous Message Robert Haas 2024-03-21 14:31:15 Re: documentation structure