pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jonathan S. Katz <jkatz@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: How about a psql backslash command to show GUCs?
Date: Mon, 11 Apr 2022 20:35:52 -0400
Message-ID: <7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org> (raw)
In-Reply-To: <531275.1649707882@sss.pgh.pa.us>
References: <FF230C05-B27A-4C7B-8514-A5A21EA3D7CC@enterprisedb.com>
	<3370142.1649348973@sss.pgh.pa.us>
	<2DB6EB50-04DF-49D1-BB5B-61C62898BB35@enterprisedb.com>
	<3370992.1649349445@sss.pgh.pa.us>
	<711e43b9-6499-6a8b-0802-fb549874658e@joeconway.com>
	<CAKFQuwb6Ju1VM+hOV2hEbSzoW40o33qp12CQUGRhS+js=vYaew@mail.gmail.com>
	<CAFj8pRA2aEY+SRjZ_WurB8512Etry3Arefv_L7fkpHW-ct3kkQ@mail.gmail.com>
	<3400691.1649363759@sss.pgh.pa.us>
	<YlFQLzlPi4QD0wSi@msg.df7cb.de>
	<4105551.1649514677@sss.pgh.pa.us>
	<YlGtICTMIJ886Ij3@jrouhaud>
	<afad841b-cc31-1784-84f7-b6c3c71d0c5d@postgresql.org>
	<4115803.1649521632@sss.pgh.pa.us>
	<043bcb40-052f-5c85-63ff-d6a2b5a0b7ca@postgresql.org>
	<495595.1649704355@sss.pgh.pa.us>
	<9439380b-a81f-c910-f527-db4d470b026b@postgresql.org>
	<531275.1649707882@sss.pgh.pa.us>

On 4/11/22 4:11 PM, Tom Lane wrote:
> "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"?

Running through a few GUCs, that seems reasonable. Happy to test the 
patch out prior to commit to see if it renders better.

Jonathan


Attachments:

  OpenPGP_signature (application/pgp-signature, 839B) download

view thread (71+ messages)  latest in thread

Message-ID: <7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org>
Permalink:  ../7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org/
Also on:    postgresql.org/message-id/7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: jkatz@postgresql.org, tgl@sss.pgh.pa.us, rjuju123@gmail.com, myon@debian.org, pavel.stehule@gmail.com, david.g.johnston@gmail.com, mail@joeconway.com, mark.dilger@enterprisedb.com, andrew@dunslane.net, dgrowleyml@gmail.com, alvherre@alvh.no-ip.org
  Subject: Re: How about a psql backslash command to show GUCs?
  In-Reply-To: <7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org>
  References: <FF230C05-B27A-4C7B-8514-A5A21EA3D7CC@enterprisedb.com> <3370142.1649348973@sss.pgh.pa.us> <2DB6EB50-04DF-49D1-BB5B-61C62898BB35@enterprisedb.com> <3370992.1649349445@sss.pgh.pa.us> <711e43b9-6499-6a8b-0802-fb549874658e@joeconway.com> <CAKFQuwb6Ju1VM+hOV2hEbSzoW40o33qp12CQUGRhS+js=vYaew@mail.gmail.com> <CAFj8pRA2aEY+SRjZ_WurB8512Etry3Arefv_L7fkpHW-ct3kkQ@mail.gmail.com> <3400691.1649363759@sss.pgh.pa.us> <YlFQLzlPi4QD0wSi@msg.df7cb.de> <4105551.1649514677@sss.pgh.pa.us> <YlGtICTMIJ886Ij3@jrouhaud> <afad841b-cc31-1784-84f7-b6c3c71d0c5d@postgresql.org> <4115803.1649521632@sss.pgh.pa.us> <043bcb40-052f-5c85-63ff-d6a2b5a0b7ca@postgresql.org> <495595.1649704355@sss.pgh.pa.us> <9439380b-a81f-c910-f527-db4d470b026b@postgresql.org> <531275.1649707882@sss.pgh.pa.us> <7bba5a32-65fe-04e1-7c36-efd963a625c9@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox