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 1hcZBo-0007cG-5Z for pgsql-hackers@arkaria.postgresql.org; Sun, 16 Jun 2019 17:43:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hcZBn-00061G-1B for pgsql-hackers@arkaria.postgresql.org; Sun, 16 Jun 2019 17:43:35 +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 1hcZBm-000613-MI for pgsql-hackers@lists.postgresql.org; Sun, 16 Jun 2019 17:43:34 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hcZBk-0008F3-Fh for pgsql-hackers@postgresql.org; Sun, 16 Jun 2019 17:43:33 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 93D875F7AF; Sun, 16 Jun 2019 13:43:32 -0400 (EDT) Date: Sun, 16 Jun 2019 13:43:32 -0400 From: Stephen Frost To: Tom Lane Cc: Amit Kapila , Ian Barwick , "pgsql-hackers@postgresql.org" Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions Message-ID: <20190616174332.GR2480@tamriel.snowman.net> References: <20190614160835.GF2480@tamriel.snowman.net> <20190616171610.GO2480@tamriel.snowman.net> <5218.1560705699@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SAbzvNCM/REt5CdL" Content-Disposition: inline In-Reply-To: <5218.1560705699@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 --SAbzvNCM/REt5CdL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Unless there's actually a use-case for duplicate entries in > > postgresql.auto.conf, >=20 > There isn't --- guc.c will just discard the earlier duplicates. One might be able to argue for trying to create a stack or some such, to allow you to more easily move between values or to see what the value was set to at some point in the past, etc etc. Until we see an actual thought out use-case along those lines that requires supporting duplicates in some fashion though, with code to make it all work, I don't think we should allow it. > > what we should do is clean them up (and possibly > > throw a WARNING or similar at the user saying "something modified your > > postgresql.auto.conf in an unexpected way"). I'd suggest we do that on > > every ALTER SYSTEM call. >=20 > +1 for having ALTER SYSTEM clean out duplicates. Not sure whether > a WARNING would seem too in-your-face. I'd hope for a warning from basically every part of the system when it detects, clearly, that a file was changed in a way that it shouldn't have been. If we don't throw a warning, then we're implying that it's acceptable, but then cleaning up the duplicates, which seems pretty confusing. Thanks, Stephen --SAbzvNCM/REt5CdL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJdBn/EAAoJEO1sijiDR2RVPW8QALSp3inwpY6ualy+hJcUrOih G7QWMUskHh83eM40D0RzDQpTN0CBHgORw6fQY0tvOEMbfGCdgtkYDSIGnNyZcbjD IgqPJc/Z2lhVa+BVMtl2oFtN/urDQpgG/N4eLxpC7y3Lo7+eRMMsHLttc+S8hwUW F1MMTUwDgY0aU+M+31gxCZewcqdE7EXN9n9sQ7fJDlKcpZ2HpLwqea2OXI5PX5m4 0rUslMgWkFOO6/tgiETiqAUtciyITxap9q6s/VHf1GLYNCoBJv9+b1l7h3Is3gKp P2rWRLArAgE5GxOyk5MYuvlasfD2eXB6i5/cLJvwmguTQ1TuAx2WwoT8+I61aXyE t+7RRMo5GjzGuyBbkZtjZ04U332aLYB/dceb8r+u6GIvU5XelB94Q3W+kdWv5spv m6Gz+XdbCsFFgWSUboKojK/MgJ3vXUmsSmyZbCjGTVgyPuDe4TLRecbGwEK151gA 8LaoR6NvKbwLbMk9/T9ifVILPBKx7O/wRvhrx8gy7HJ5d3ZyHJxYPvyvLkh+muYk rIfcmFq+iZ3MSDHGYX3CzY0oWmtjPvcYKajHXCQMu2Hu/S9v9tFI1b5iuaUFPInH zUpOYdbzo2mvwlruWIK9uvXcO7mbWrGcx0c45rFytSCGZMwzyDBkIxZcal8LKhd2 bS75JDUoprI9SUXtWhPn =/8ty -----END PGP SIGNATURE----- --SAbzvNCM/REt5CdL--