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 1heMaX-0000FQ-5d for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jun 2019 16:40:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1heMaV-0000vG-Le for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jun 2019 16:40:31 +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 1heMaV-0000sd-9v for pgsql-hackers@lists.postgresql.org; Fri, 21 Jun 2019 16:40:31 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1heMaS-0005Zl-Qt for pgsql-hackers@postgresql.org; Fri, 21 Jun 2019 16:40:29 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 950B75F7A8; Fri, 21 Jun 2019 12:40:28 -0400 (EDT) Date: Fri, 21 Jun 2019 12:40:28 -0400 From: Stephen Frost To: Tom Lane Cc: Robert Haas , Ian Barwick , Amit Kapila , "pgsql-hackers@postgresql.org" Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions Message-ID: <20190621164028.GO2480@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h6kYMYtSOeQy+8K8" Content-Disposition: inline In-Reply-To: <20372.1561134638@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --h6kYMYtSOeQy+8K8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Robert Haas writes: > > To me, forcing every tools author to use postgresql.conf parsing tools > > rather than just appending to the file is a needless burden on tool > > authors. I'd vote for just having ALTER SYSTEM silently drop all but > > the last of duplicated entries. >=20 > I haven't been paying too close attention to this thread, but isn't > that exactly what it does now and always has? guc.c, at least, certainly > is going to interpret duplicate entries that way. The issue isn't with reading them and interpreting them, it's what happens when you run ALTER SYSTEM and it goes and modifies the file. Presently, it basically operates on the first entry it finds when performing a SET or a RESET. Which also means that you can issue SET's to your heart's content, and if there's a duplicate for that GUC, you'll never actually change what is interpreted. Thanks, Stephen --h6kYMYtSOeQy+8K8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJdDQh8AAoJEO1sijiDR2RVYEoQAKTCgiPoGornCPV9O+nRBLY/ c84LUMPa5sYtKPsHwG2V4L48Cg1u2iqDLqc7bn1up0pyAy0eMCfFWi15dBg3MM4a bv1maVBqvNs5t9xmu+7D33RCUashLGbkB+uP5ELHiBUATtmj7+BX6RpbLD2odBC7 ATvtUtTGvi69OnIVhzBRysA0ARNjQ0LCD2dYpsc0Wxg5213iAiMX6789Lhjc7iVJ 8WLf+qgfwXLz5z9ZZwhxVaaDy8DWXTl3cS7SMF2u7eBgXPUVUdbQ4P0GQPq9ttl6 5tL1D2djAPxI+/CvibXIGWTOqViTQ/tRu7OFl5XSy3Rg+VJld2k/oYdsDQIvkS3d f8s0ODSV7wRdVfsvzCnXoePkbUmxYi5hJdPBzU0NOHAXJjpRMEuRaDpooWKPMFJY +HJx+bQeZpZ3wSgo8S0cR0mMh5pD1O4aXZUjXMuK5/4fVR4aBcKWgrK5GrZsC3d3 /NqZ0V+swD+0VL02oEO+l1JWGBPXpWpfzY5DbYM0gWNeQ0Fuwi7CK8f6WaDtUBpH eUZ3B/Cs2Fc7XyyjF/3j0m2EQL/TeWC7qa1a5RePYKeNjKjme/+HyGxe1n1DK58P P9PZmg3QEnfDfp6ddRsNvBIhAD/qn4URWXsieVjqoJ5N5LODans0rSOU7oIMRmEG +bTfr7auQseojkOmTKV1 =Zewk -----END PGP SIGNATURE----- --h6kYMYtSOeQy+8K8--