Re: How about a psql backslash command to show GUCs?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, David Rowley <dgrowleyml(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: How about a psql backslash command to show GUCs?
Date: 2022-04-09 16:49:57
Message-ID: CAKFQuwab7BqXMKnqd=QBJF_XLnBiKSrGfA2xUeP9Yja2cCeH3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 9, 2022 at 9:27 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Jonathan S. Katz" <jkatz(at)postgresql(dot)org> writes:
> > -1, at least for the moment. Sometimes a user doesn't know what they're
> > looking for coupled with being unaware of what the default value is. If
> > a setting is set to a default value and that value is the problematic
> > setting, a user should be able to see that even in a full list.
>
> Sure, but then you do "\dconfig *". With there being several hundred
> GUCs (and no doubt more coming), I'm not sure that "show me every GUC"
> is a common use-case at all, let alone so common as to deserve being
> the default behavior.
>
>
I'm for having a default that doesn't mean "show everything".

I'm also wondering whether we can invent GUC namespaces for the different
contexts, so I can use a pattern like: context.internal.*

A similar ability for category would be nice but we'd have to invent labels
to make it practical.

\dconfig [pattern [mode]]

mode: all, overridden

So mode is overridden if pattern is absent but all if pattern is present,
with the ability to specify overridden.

pattern: [[{context.{context label}}|{category.{category
label}}.]...]{parameter name pattern}
parameter name pattern: [{two part name prefix}.]{base parameter pattern}

One thing we could perhaps do to reduce confusion is to change the
> table heading when doing this, say from "List of configuration parameters"
> to "List of non-default configuration parameters".
>
>
I'd be inclined to echo a note after the output table that says that not
all configuration parameters are displayed - possibly even providing a
count [all - overridden]. The header is likely to be ignored even if it
still ends up on screen after scrolling.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-04-09 16:50:23 Re: How about a psql backslash command to show GUCs?
Previous Message Julien Rouhaud 2022-04-09 16:43:08 Re: Add parameter jit_warn_above_fraction