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 1hfU95-0008Ug-2M for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2019 18:56:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hfU93-0005Rw-TX for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2019 18:56:49 +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 1hfU93-0005Ro-HY for pgsql-hackers@lists.postgresql.org; Mon, 24 Jun 2019 18:56:49 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hfU91-0004Y1-7X for pgsql-hackers@postgresql.org; Mon, 24 Jun 2019 18:56:48 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 3C3115F7B1; Mon, 24 Jun 2019 14:56:47 -0400 (EDT) Date: Mon, 24 Jun 2019 14:56:47 -0400 From: Stephen Frost To: Robert Haas Cc: Tom Lane , Ian Barwick , Amit Kapila , "pgsql-hackers@postgresql.org" Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions Message-ID: <20190624185647.GW2480@tamriel.snowman.net> References: <20190614160835.GF2480@tamriel.snowman.net> <20190616171610.GO2480@tamriel.snowman.net> <27dc9f8d-8d8f-9dd1-0494-5d8bd2f49a45@2ndquadrant.com> <20372.1561134638@sss.pgh.pa.us> <20190621164028.GO2480@tamriel.snowman.net> <21353.1561136112@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EqMiG03fNEfpmvTL" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --EqMiG03fNEfpmvTL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Robert Haas (robertmhaas@gmail.com) wrote: > On Fri, Jun 21, 2019 at 12:55 PM Tom Lane wrote: > > Ah, got it. So it seems like the correct behavior might be for > > ALTER SYSTEM to > > (a) run through the whole file and remove any conflicting lines; > > (b) append new setting at the end. >=20 > That is exactly the behavior for which I am arguing. Stephen also > wants a warning, but I disagree, because the warning is totally > non-actionable. It tells you that some tool, at some point in the > past, did something bad. You can't do anything about that, and you > wouldn't need to except for the arbitrary decision to label duplicate > lines as bad in the first place. Stephen and Magnus want a warning, because it's an indication that a tool author, or *something* modified the file in an unexpected way, and that we are having to do some kind of cleanup on the file because of it. If it was a tool author, who it certainly may very well be as they're writing in support for the v12 changes, they'd almost certainly go and fix their code to avoid doing that, lest users complain, which would be exactly the behavior we want. If it was the user themselves, which is also *entirely* likely, then hopefully they'd realize that they really shouldn't be modifying that file. Thanks, Stephen --EqMiG03fNEfpmvTL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJdERzuAAoJEO1sijiDR2RV7wYP/ArpYoiDJLGKBT9SIS9iqHZD ejGhNWv60JamIwrkL7mvn63/kDTXQbbTUwF7A9+g92bGpWGAf+NJ7isUBKwXy/4g lkdy3KZxfP+IgHGpEfdjLR7rMDyzXSnXqLcJumNXYPXnIMnrcdcxLJVu8WuHPvSw tKvmLdLOYxOADxMcHgyhTlcb2AtleFPmvia09WoZZ2WIQEPT0cUGO6LFuyNLwxEb o4/0MoXkEm9EMWmMy1qkRkjwF9j2lyANzltGcQoLctTTQY+7o74S7KvZykC9BNzJ 2I+HGjI+cWf8zrQQ7hhrhK8/GkSiRcksPdo/ULrJcPWouF/UEj5y+bncjoLTOone 5E4iWnzT7TQNiQhrsYkXXNM/SGYu2HqLX8tTP1iYcIavFrhSQ+8M7jELMQaYywYX RZ7ZmImPUTEyQ5xPN0ceD4WmimVkc8MkQ0yuM67Njpm5dsglKrWXg0isvCdirMYN 1Yv09+mHJ0+N7eIKu6kI/I4+vDgDye8AlzO3KUUjeDCfdKoyzVpz7+dpl2MNjBaO 3P8PqVWqWwMfVHk6Lxk8h8O8VnVdlg1j43dHiI0VYbre01E9bVki/m7DH9/hMTfG gBTbvCEo59nGUhp2qWMj+OaMnKxOfiWS68aVWEcP1UG85SCeB3/fSXRnxn9Y6vau rUsL98USxyGDV3UVpbeF =iVTT -----END PGP SIGNATURE----- --EqMiG03fNEfpmvTL--