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 1htg1V-0008Rg-VX for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 22:27:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1htg1U-0001ty-LL for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 22:27:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htg1U-0001tr-9h for pgsql-hackers@lists.postgresql.org; Fri, 02 Aug 2019 22:27:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1htg1S-0008WF-5I for pgsql-hackers@postgresql.org; Fri, 02 Aug 2019 22:27:39 +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 x72MRa6h031698; Fri, 2 Aug 2019 18:27:36 -0400 From: Tom Lane To: Tomas Vondra cc: Amit Kapila , Ian Barwick , Stephen Frost , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions In-reply-to: <20190802222254.qsvqjtkwte464lu3@development> 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> Comments: In-reply-to Tomas Vondra message dated "Sat, 03 Aug 2019 00:22:54 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31696.1564784856.1@sss.pgh.pa.us> Date: Fri, 02 Aug 2019 18:27:36 -0400 Message-ID: <31697.1564784856@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > There seems to be a consensus that this this not a pg_basebackup issue > (i.e. duplicate values don't make the file invalid), and it should be > handled in ALTER SYSTEM. Yeah. I doubt pg_basebackup is the only actor that can create such situations. > The proposal seems to be to run through the .auto.conf file, remove any > duplicates, and append the new entry at the end. That seems reasonable. +1 > There was a discussion whether to print warnings about the duplicates. I > personally see not much point in doing that - if we consider duplicates > to be expected, and if ALTER SYSTEM has the license to rework the config > file any way it wants, why warn about it? Personally I agree that warnings are unnecessary. > The main issue however is that no code was written yet. Seems like it ought to be relatively simple ... but I didn't look. regards, tom lane