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 1nyDCo-0005F3-0r for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2022 13:55:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nyDCm-0005zo-JM for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2022 13:55:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyDCm-0005zf-6d for pgsql-hackers@lists.postgresql.org; Mon, 06 Jun 2022 13:55:40 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nyDCe-0007Iu-9q for pgsql-hackers@lists.postgresql.org; Mon, 06 Jun 2022 13:55:37 +0000 Received: by mail-il1-x133.google.com with SMTP id h18so11966100ilj.7 for ; Mon, 06 Jun 2022 06:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lW/EEklhMwVgtLvT8GNkK7sMZ4QlrwJFvZ93Lj8nQxA=; b=FvVPuEqXcWYyow5Y7JbjmgVNNd6gEUfhipRPUXuqgxh+CaDOdeldh9oKvhEbBIK3lX MB+62qQVU2F/j26kz2OjcRMDLVxmc782tm2KFtLFky3R72rNuOxF7ZGCMNMP8BlREBn2 OPtWHNnpohAgXscRBuiYU576HptzaNIslrwEmzDgTIZl1Mo7Sf6bU0PxbPWI0X7AWmcC wMTh+LeTRbc7y/HHHD4RjTe+B8UfYcLtZI1/5kPuFKZgdJJg46aDVVQ+Qglb/awK08XJ ib+So05SeoN2V+Qm5NCnoDGDRB3dJehoqrHFMFmQBwSsWDIMTKEax0T4UPNP39tJI9wz /G4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lW/EEklhMwVgtLvT8GNkK7sMZ4QlrwJFvZ93Lj8nQxA=; b=ZsK5kwY0tGrkcPaidhX5EIWwbjMjSVJSQr0Xdpr3UEr9vBu89Zsi/kGiGviWUMoYdZ PXRaRzrmek5hO38GDrmM0nVjKgBt0YcHlasQCXKJQhuvmxAKQrKOrOgcI5xE8CuU8t3S /jPSZ0AwXWGntIhAk1zXWi0CYamg5cd47r/BPkef1+9x6lKfXXvBw/e0K8EpW/oBh7tK +/En3pJx82OAxwBN8XQue1KnKFqf/N40SIje0VpcQtB5LJFG4dzkthCHDianA7mM3NLw Ouf0dip2E3qyuZ3FVhrHybch6Xl5Q6HCUtMjlKYryihn4Wi3I8q8EIjQWVOQ95uILz8H iQpg== X-Gm-Message-State: AOAM533nPaxOM1hGgwsuuli9JF4cYgwq7WG9yhTxOgNvqFaYpSlE6dAS 2sHu8HcdibAbYMCe9DMuPkG47w== X-Google-Smtp-Source: ABdhPJx+OcBQT4SZOwmSiTbLZidXrVFlKM1fAQwC9TfMmUgyxxCOBj7fY1TSwuaXK91yizmrawZ0TA== X-Received: by 2002:a05:6e02:170f:b0:2d3:dc72:7172 with SMTP id u15-20020a056e02170f00b002d3dc727172mr14339433ill.218.1654523730315; Mon, 06 Jun 2022 06:55:30 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id w10-20020a02394a000000b0032e79d23f8fsm5684801jae.156.2022.06.06.06.55.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jun 2022 06:55:29 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 37C8E800B38; Mon, 6 Jun 2022 08:55:29 -0500 (CDT) Date: Mon, 6 Jun 2022 08:55:29 -0500 From: Justin Pryzby To: Tom Lane 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? Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <807242.1649776780@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 12, 2022 at 11:19:40AM -0400, Tom Lane wrote: > "Jonathan S. Katz" 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. 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. -- Justin