Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huf00-0008Md-CY for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 15:34:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1huezz-00058P-11 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 15:34:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huezy-00054d-Mo for pgsql-hackers@lists.postgresql.org; Mon, 05 Aug 2019 15:34:10 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huezw-0007DU-7T for pgsql-hackers@postgresql.org; Mon, 05 Aug 2019 15:34:10 +0000 Received: from msg.df7cb.de (unknown [IPv6:2003:5b:203b:100:7627:eaff:fe52:8e03]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 462MHz0w1wz3Dx6; Mon, 5 Aug 2019 17:34:07 +0200 (CEST) Date: Mon, 5 Aug 2019 17:34:06 +0200 From: Christoph Berg To: Tomas Vondra Cc: Andres Freund , Stephen Frost , Amit Kapila , Ian Barwick , Robert Haas , Tom Lane , "pgsql-hackers@postgresql.org" Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions Message-ID: <20190805153406.GA24325@msg.df7cb.de> Mail-Followup-To: Christoph Berg , Tomas Vondra , Andres Freund , Stephen Frost , Amit Kapila , Ian Barwick , Robert Haas , Tom Lane , "pgsql-hackers@postgresql.org" References: <20190802222254.qsvqjtkwte464lu3@development> <31697.1564784856@sss.pgh.pa.us> <32681.1564786027@sss.pgh.pa.us> <20190803004558.jfkbngi6g64eaqku@alap3.anarazel.de> <20190803010802.rs3cz2kjq4dl4olu@alap3.anarazel.de> <20190803124111.2aaddumd7url5wmq@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190803124111.2aaddumd7url5wmq@development> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Re: Tomas Vondra 2019-08-03 <20190803124111.2aaddumd7url5wmq@development> > If we really want to give external tools a sensible (and optional) API > to access the file, a simple command-line tool seems much better. Say we > have something like > > pg_config_file -f PATH --set KEY VALUE > pg_config_file -f PATH --get KEY Fwiw, Debian has pg_conftool (based on the perl lib around PgCommon.pm): NAME pg_conftool - read and edit PostgreSQL cluster configuration files SYNOPSIS pg_conftool [options] [version cluster] [configfile] command DESCRIPTION pg_conftool allows to show and set parameters in PostgreSQL configuration files. If version cluster is omitted, it defaults to the default cluster (see user_clusters(5) and postgresqlrc(5)). If configfile is omitted, it defaults to postgresql.conf. configfile can also be a path, in which case version cluster is ignored. OPTIONS -b, --boolean Format boolean value as on or off (not for "show all"). -s, --short Show only the value (instead of key = value pair). -v, --verbose Verbose output. --help Print help. COMMANDS show parameter|all Show a parameter, or all present in this config file. set parameter value Set or update a parameter. remove parameter Remove (comment out) a parameter from a config file. edit Open the config file in an editor. Unless $EDITOR is set, vi is used. SEE ALSO user_clusters(5), postgresqlrc(5) AUTHOR Christoph Berg Debian 2019-07-15 PG_CONFTOOL(1)