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 1nCQEd-0008Kv-Kk for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 18:08:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nCQEc-0006QC-7X for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 18:08:02 +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 1nCQEb-0006Q3-Qo for pgsql-hackers@lists.postgresql.org; Tue, 25 Jan 2022 18:08:01 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nCQEU-0003mg-K2 for pgsql-hackers@lists.postgresql.org; Tue, 25 Jan 2022 18:08:00 +0000 Received: by mail-io1-xd34.google.com with SMTP id z199so10193369iof.10 for ; Tue, 25 Jan 2022 10:07:54 -0800 (PST) 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=H/pi5ftZz/2VRKfS5gq1l2dKxbO63LQfyje+/rCcBPw=; b=7z2XFFqRt2WM7k3RYXalKPTwKNfiyC4Zk3T5DqmI+RrL15R6Sj/wiXihKNw1jfYPfU hAQM2MtOBgbdsGYv6RK77vUQuNK7XUdK4U9X0y1nEnYM/+61171EdSC8nYYSWV0NwmYy PbNbhWr8y19xtxBK2J64bczV9+lQJ/pUFzkyhgTaWp5GLvoH5WVT/HMrfJlb+DeJbP2I dCGYgiLVgkq/ppwniLi71SFsGYYWHO5F7IxfBb2FiNVYpJat756ulFFRdMkPNC0xwdCN mJ4C14miMzJcregjjO+dPHZ88tQzH/2V5fR0w4C1rm2FRUcLgUeyeLZncmCfgrF+LTaJ RwkA== 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=H/pi5ftZz/2VRKfS5gq1l2dKxbO63LQfyje+/rCcBPw=; b=Yn8SEbBdw7qEVEgypjXzBu45lB6FX5a/IWqKZKx6Hkhgz8Iwo3jpc7YhMBoJlz6qN9 kN/PXiIfOwyRkd1r+HvBMEMXKzsI7kKPTZRzbHBxXXgqn8td/SOFdMXSwGgsr9CysWLU dME3Q1gDfqyYwWXidqpghbfXdYtP94eF9Y1AEFY5mzd+LNGizmMUq/e54UAcPRSQCDnr c23Y1mNynwypVoy+TVo8hRSMOPnnQJgv4b++cZF/hd7f+H1esae9QAY/jqFEM3fLWh7S Hl9k66JJAvFoNfKjGDV0XeGZrWaWkh/e4gWjuluPm8sMypHOBkelBEy4ASSk2Ja0DWk+ BZtw== X-Gm-Message-State: AOAM531x0xG60Pluxilu1StWWdfYD0X0X6frx7kcj2ZOpxzuQJ0Regfp ofnibQEe5T+F5SwerP11d2rLUg== X-Google-Smtp-Source: ABdhPJz4bf5EWfwMwl8VZlEY05kUPLW3hfZ/CpQw8zG8BAqGmK4WLR381+IYiAXqAsgYL3vmQYqKPQ== X-Received: by 2002:a05:6602:1409:: with SMTP id t9mr11615111iov.166.1643134073793; Tue, 25 Jan 2022 10:07:53 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 14sm9042212iln.13.2022.01.25.10.07.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jan 2022 10:07:53 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 1357F8007F5; Tue, 25 Jan 2022 12:07:51 -0600 (CST) Date: Tue, 25 Jan 2022 12:07:51 -0600 From: Justin Pryzby To: Peter Eisentraut Cc: Michael Paquier , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org, bruce@momjian.us, tgl@sss.pgh.pa.us Subject: Re: GUC flags Message-ID: <20220125180751.GH23027@telsasoft.com> References: <20211209155322.GG17618@telsasoft.com> <20211229023240.GM24477@telsasoft.com> <20220105.114757.369416916044334409.horikyota.ntt@gmail.com> <20220105030648.GE14051@telsasoft.com> <20220105235517.GR14051@telsasoft.com> <20220106053641.GW14051@telsasoft.com> <20220125010729.GC23027@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Jan 25, 2022 at 11:47:14AM +0100, Peter Eisentraut wrote: > On 25.01.22 02:07, Justin Pryzby wrote: > > +CREATE TABLE pg_settings_flags AS SELECT name, category, > > + 'NO_SHOW_ALL' =ANY(flags) AS no_show_all, > > + 'NO_RESET_ALL' =ANY(flags) AS no_reset_all, > > + 'NOT_IN_SAMPLE' =ANY(flags) AS not_in_sample, > > + 'EXPLAIN' =ANY(flags) AS guc_explain, > > + 'COMPUTED' =ANY(flags) AS guc_computed > > + FROM pg_show_all_settings(); > > Does this stuff have any value for users? I'm worried we are exposing a > bunch of stuff that is really just for internal purposes. Like, what value > does showing "not_in_sample" have? On the other hand, "guc_explain" might > be genuinely useful, since that is part of a user-facing feature. (I don't > like the "guc_*" naming though.) > > Your patch doesn't contain a documentation change, so I don't know how and > to what extend this is supposed to be presented to users. I want to avoid putting this in pg_settings. The two options discussed so far are: - to add an function to return the flags; - to add the flags to pg_show_all_settings(), but not show it in pg_settings view; I interpretted Michael's suggested as adding it to pg_get_all_settings(), but *not* including it in the pg_settings view. Now it seems like I misunderstood, and Michael wants to add it to the view. But, even if we only handle the 5 flags we have an immediate use for, it makes the user-facing view too "wide", just to accommodate this internal use. If it were in the pg_settings view, I think it ought to have *all* the flags (not just the flags that help us to retire ./check_guc). That's much too much. -- Justin