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

From: Justin Pryzby <pryzby(at)telsasoft(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>, "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>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: How about a psql backslash command to show GUCs?
Date: 2022-06-06 13:55:29
Message-ID: 20220606135529.GV29853@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 12, 2022 at 11:19:40AM -0400, 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.

I noticed this is showing "pre-computed" gucs, like:

shared_memory_size | 149MB
shared_memory_size_in_huge_pages | 75

I'm not opposed to that, but I wonder if that's what's intended / best.

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-06-06 14:20:44 Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list
Previous Message Dong Wook Lee 2022-06-06 13:30:25 pg_buffercache: add sql test