pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Jonathan S. Katz <jkatz@postgresql.org>
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: pgsql-hackers@lists.postgresql.org
Subject: Re: How about a psql backslash command to show GUCs?
Date: Mon, 06 Jun 2022 12:02:15 -0400
Message-ID: <918042.1654531335@sss.pgh.pa.us> (raw)
In-Reply-To: <20220606135529.GV29853@telsasoft.com>
References: <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>
	<807242.1649776780@sss.pgh.pa.us>
	<20220606135529.GV29853@telsasoft.com>

Justin Pryzby <pryzby@telsasoft.com> writes:
> 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.

I had suggested upthread that we might want to hide items with
source = 'override', but that idea didn't seem to be getting traction.
A different idea is to hide items with context = 'internal'.
Looking at the items selected by the current rule in a default
installation:

postgres=# SELECT s.name, source, context FROM pg_catalog.pg_settings s
WHERE s.source <> 'default' AND
      s.setting IS DISTINCT FROM s.boot_val
ORDER BY 1;
               name               |        source        |  context   
----------------------------------+----------------------+------------
 TimeZone                         | configuration file   | user
 application_name                 | client               | user
 client_encoding                  | client               | user
 config_file                      | override             | postmaster
 data_directory                   | override             | postmaster
 default_text_search_config       | configuration file   | user
 hba_file                         | override             | postmaster
 ident_file                       | override             | postmaster
 lc_messages                      | configuration file   | superuser
 log_timezone                     | configuration file   | sighup
 max_stack_depth                  | environment variable | superuser
 shared_memory_size               | override             | internal
 shared_memory_size_in_huge_pages | override             | internal
 wal_buffers                      | override             | postmaster
(14 rows)

So hiding internal-context items would hit exactly the two you mention,
but hiding override-source items would hit several more.

(I'm kind of wondering why wal_buffers is showing as "override";
that seems like a quirk.)

Thoughts?

			regards, tom lane





view thread (71+ messages)  latest in thread

Message-ID: <918042.1654531335@sss.pgh.pa.us>
Permalink:  ../918042.1654531335@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/918042.1654531335@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, pryzby@telsasoft.com, jkatz@postgresql.org, 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: <918042.1654531335@sss.pgh.pa.us>
  References: <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> <807242.1649776780@sss.pgh.pa.us> <20220606135529.GV29853@telsasoft.com> <918042.1654531335@sss.pgh.pa.us>

* 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