pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Be more careful about GucSource for internally-driven GUC settin
Date: Wed, 08 Jun 2022 17:26:24 +0000
Message-ID: <E1nyzRn-003KdB-Md@gemulon.postgresql.org> (raw)

Be more careful about GucSource for internally-driven GUC settings.

The original advice for hard-wired SetConfigOption calls was to use
PGC_S_OVERRIDE, particularly for PGC_INTERNAL GUCs.  However,
that's really overkill for PGC_INTERNAL GUCs, since there is no
possibility that we need to override a user-provided setting.
Instead use PGC_S_DYNAMIC_DEFAULT in most places, so that the
value will appear with source = 'default' in pg_settings and thereby
not be shown by psql's new \dconfig command.  The one exception is
that when changing in_hot_standby in a hot-standby session, we still
use PGC_S_OVERRIDE, because people felt that seeing that in \dconfig
would be a good thing.

Similarly use PGC_S_DYNAMIC_DEFAULT for the auto-tune value of
wal_buffers (if possible, that is if wal_buffers wasn't explicitly
set to -1), and for the typical 2MB value of max_stack_depth.

In combination these changes remove four not-very-interesting
entries from the typical output of \dconfig, all of which people
fingered as "why is that showing up?" in the discussion thread.

Discussion: https://postgr.es/m/3118455.1649267333@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7ab5b4eb483478bc85ad45ef5405b4a70c3f4c94

Modified Files
--------------
src/backend/access/transam/xlog.c   | 15 ++++++++++++---
src/backend/bootstrap/bootstrap.c   |  2 +-
src/backend/postmaster/postmaster.c |  2 +-
src/backend/storage/ipc/ipci.c      |  6 ++++--
src/backend/utils/init/miscinit.c   |  6 +++---
src/backend/utils/init/postinit.c   |  6 +++---
src/backend/utils/misc/guc-file.l   |  5 ++---
src/backend/utils/misc/guc.c        | 34 ++++++++++++++++++++--------------
src/include/utils/guc.h             |  8 ++++++--
9 files changed, 52 insertions(+), 32 deletions(-)



Message-ID: <E1nyzRn-003KdB-Md@gemulon.postgresql.org>
Permalink:  ../E1nyzRn-003KdB-Md@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nyzRn-003KdB-Md@gemulon.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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Be more careful about GucSource for internally-driven GUC settin
  In-Reply-To: <E1nyzRn-003KdB-Md@gemulon.postgresql.org>
  References: <E1nyzRn-003KdB-Md@gemulon.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