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 1izmST-00077c-RE for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Feb 2020 19:05:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1izmSS-0000Qk-Ku for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Feb 2020 19:05:00 +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 1izmSS-0000Nj-8Z for pgsql-hackers@lists.postgresql.org; Thu, 06 Feb 2020 19:05:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1izmSP-00054L-Nf for pgsql-hackers@lists.postgresql.org; Thu, 06 Feb 2020 19:04:59 +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 016J4rCc027575; Thu, 6 Feb 2020 14:04:54 -0500 From: Tom Lane To: Michael Paquier cc: Daniel Gustafsson , Postgres hackers Subject: Re: Improve errors when setting incorrect bounds for SSL protocols In-reply-to: <20200118033620.GC230692@paquier.xyz> References: <20200114035420.GE1515@paquier.xyz> <20200115022805.GB2243@paquier.xyz> <20200116010052.GA3117@paquier.xyz> <20200118033620.GC230692@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Sat, 18 Jan 2020 12:36:20 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27573.1581015893.1@sss.pgh.pa.us> Date: Thu, 06 Feb 2020 14:04:53 -0500 Message-ID: <27574.1581015893@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > On Thu, Jan 16, 2020 at 10:00:52AM +0900, Michael Paquier wrote: >> Thanks for the review. Let's wait a couple of days to see if others >> have objections or more comments about this patch, but I'd like to >> fix the issue and backpatch down to 12 where the parameters have been >> introduced. > And committed. I just happened to look at this patch while working on the release notes. I think this is a bad idea and very probably creates worse problems than it fixes. As we have learned painfully in the past, you can't have GUC check or assign hooks that look at other GUC variables, because that creates order-of-operations problems. If a postgresql.conf update is trying to change both values (hardly an unlikely scenario, for this pair of variables) then the checks are going to be comparing against the old values of the other variables, leading to either incorrect rejections of valid states or incorrect acceptances of invalid states. It's pure accident that the particular cases tested in the regression tests behave sanely. I think this should be reverted. Perhaps there's a way to do it without these problems, but we failed to find one in the past. regards, tom lane