Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyFBb-00033F-RW for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2022 16:02:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nyFBa-0003N4-Br for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2022 16:02:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyFBa-0003Mu-2c for pgsql-hackers@lists.postgresql.org; Mon, 06 Jun 2022 16:02:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyFBX-0008Os-MW; Mon, 06 Jun 2022 16:02:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 256G2FT0918043; Mon, 6 Jun 2022 12:02:15 -0400 From: Tom Lane To: Justin Pryzby cc: "Jonathan S. Katz" , Julien Rouhaud , Christoph Berg , Pavel Stehule , "David G. Johnston" , Joe Conway , Mark Dilger , Andrew Dunstan , David Rowley , Alvaro Herrera , pgsql-hackers@lists.postgresql.org Subject: Re: How about a psql backslash command to show GUCs? In-reply-to: <20220606135529.GV29853@telsasoft.com> References: <4105551.1649514677@sss.pgh.pa.us> <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> Comments: In-reply-to Justin Pryzby message dated "Mon, 06 Jun 2022 08:55:29 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <918041.1654531335.1@sss.pgh.pa.us> Date: Mon, 06 Jun 2022 12:02:15 -0400 Message-ID: <918042.1654531335@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby 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