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

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(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-12 16:36:55
Message-ID: c52349d9-297d-1be2-b524-50001b55ca70@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/12/22 11:19 AM, Tom Lane wrote:
> "Jonathan S. Katz" <jkatz(at)postgresql(dot)org> writes:
>> On 4/11/22 4:11 PM, Tom Lane wrote:
>>> This idea does somewhat address my unhappiness upthread about printing
>>> values with source = 'internal', but I see that it gets confused by
>>> some GUCs with custom show hooks, like unix_socket_permissions.
>>> Maybe it needs to be "source != 'default' AND setting != boot_val"?
>
>> Running through a few GUCs, that seems reasonable. Happy to test the
>> patch out prior to commit to see if it renders better.
>
> It'd just look like this, I think. I see from looking at guc.c that
> boot_val can be NULL, so we'd better use IS DISTINCT FROM.

(IS DISTINCT FROM is pretty handy :)

I tested it and I like this a lot better, at least it's much more
consolidated. They all seem to be generated (directories, timezones,
collations/encodings).

The one exception to this seems to be "max_stack_depth", which is
rendering on my "\dconfig" though I didn't change it, an it's showing
it's default value of 2MB. "boot_val" says 100, "reset_val" says 2048,
and it's commented out in my postgresql.conf. Do we want to align that?

That said, the patch itself LGTM.

Jonathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-04-12 17:00:41 Re: How about a psql backslash command to show GUCs?
Previous Message Nathan Bossart 2022-04-12 16:27:42 Re: avoid multiple hard links to same WAL file after a crash