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 1htgKR-0000i5-70 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 22:47:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1htgKP-0000kg-Rv for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 22:47:13 +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 1htgKP-0000kZ-Jb for pgsql-hackers@lists.postgresql.org; Fri, 02 Aug 2019 22:47:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htgKN-00048m-Ct for pgsql-hackers@postgresql.org; Fri, 02 Aug 2019 22:47:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x72Ml7pW032682; Fri, 2 Aug 2019 18:47:07 -0400 From: Tom Lane To: Stephen Frost cc: Amit Kapila , Ian Barwick , Robert Haas , Tomas Vondra , "pgsql-hackers@postgresql.org" Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions In-reply-to: References: <20372.1561134638@sss.pgh.pa.us> <20190621164028.GO2480@tamriel.snowman.net> <21353.1561136112@sss.pgh.pa.us> <20190624185647.GW2480@tamriel.snowman.net> <15032.1561403529@sss.pgh.pa.us> <20190624192014.GB2480@tamriel.snowman.net> <56aff4f3-dec8-f462-7feb-0938411b04a6@2ndquadrant.com> <20190802222254.qsvqjtkwte464lu3@development> <31697.1564784856@sss.pgh.pa.us> Comments: In-reply-to Stephen Frost message dated "Fri, 02 Aug 2019 18:38:46 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <32680.1564786027.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 02 Aug 2019 18:47:07 -0400 Message-ID: <32681.1564786027@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > On Fri, Aug 2, 2019 at 18:27 Tom Lane wrote: >>> The proposal seems to be to run through the .auto.conf file, remove an= y >>> duplicates, and append the new entry at the end. That seems reasonable= . >> +1 > I disagree that this should only be addressed in alter system, as I=E2=80= =99ve said > before and as others have agreed with. Having one set of code that can = be > used to update parameters in the auto.conf and then have that be used by > pg_basebackup, alter system, and external tools, is the right approach. I don't find that to be necessary or even desirable. Many (most?) of the situations where this would be important wouldn't have access to a running backend, and maybe not to any PG code at all --- what if your tool isn't written in C? I think it's perfectly fine to say that external tools need only append to the file, which will require no special tooling. But then we need ALTER SYSTEM to be willing to clean out duplicates, if only so you don't run out of disk space after awhile. regards, tom lane