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

From Tom Lane
Subject Re: How about a psql backslash command to show GUCs?
Date
Msg-id 531275.1649707882@sss.pgh.pa.us
Whole thread Raw
In response to Re: How about a psql backslash command to show GUCs?  ("Jonathan S. Katz" <jkatz@postgresql.org>)
Responses Re: How about a psql backslash command to show GUCs?  (Christoph Berg <cb@df7cb.de>)
Re: How about a psql backslash command to show GUCs?  ("Jonathan S. Katz" <jkatz@postgresql.org>)
List pgsql-hackers
"Jonathan S. Katz" <jkatz@postgresql.org> writes:
> My question is if we're only going to list out the settings that are 
> customized, are we going to:

> 1. Hide a setting if it matches a default value, even if a user set it 
> to be the default value? OR
> 2. Comment out all of the settings in a generated postgresql.conf file?

As committed, it prints anything that's shown as "source != 'default'"
in pg_settings, which means anything for which the value wasn't
taken from the wired-in default.  I suppose an alternative definition
could be "setting != boot_val".  Not really sure if that's better.

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"?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Markus Wanner
Date:
Subject: Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]
Next
From: sirisha chamarthi
Date:
Subject: Documentation issue with pg_stat_recovery_prefetch