Re: How about a psql backslash command to show GUCs? - Mailing list pgsql-hackers

From Jonathan S. Katz
Subject Re: How about a psql backslash command to show GUCs?
Date
Msg-id c52349d9-297d-1be2-b524-50001b55ca70@postgresql.org
Whole thread Raw
In response to Re: How about a psql backslash command to show GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How about a psql backslash command to show GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4/12/22 11:19 AM, Tom Lane wrote:
> "Jonathan S. Katz" <jkatz@postgresql.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

Attachment

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: avoid multiple hard links to same WAL file after a crash
Next
From: Tom Lane
Date:
Subject: Re: How about a psql backslash command to show GUCs?