Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oj3LF-0002wf-ES for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Oct 2022 18:54:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oj3LE-00063n-6a for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Oct 2022 18:54:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oj3LD-00060z-T4 for pgsql-hackers@lists.postgresql.org; Thu, 13 Oct 2022 18:53:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oj3LB-0004Ff-RD for pgsql-hackers@postgresql.org; Thu, 13 Oct 2022 18:53:59 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 29DIrco31061704; Thu, 13 Oct 2022 14:53:38 -0400 From: Tom Lane To: Nathan Bossart cc: Bharath Rupireddy , Peter Eisentraut , Benoit =?iso-8859-1?Q?Lobr=E9au?= , Alvaro Herrera , Robert Haas , "Bossart, Nathan" , David Steele , Fujii Masao , "pgsql-hackers@postgresql.org" , Michael Paquier , Magnus Hagander , Stephen Frost Subject: Re: archive modules In-reply-to: <20221013182408.GA1551106@nathanxps13> References: <2884265.1663188443@sss.pgh.pa.us> <20220914211746.GA2986134@nathanxps13> <2910705.1663193529@sss.pgh.pa.us> <20220914222736.GA3042279@nathanxps13> <20220923161402.GA736566@nathanxps13> <4f66de67-35a0-3fe7-fa61-d618e1bd2c2c@enterprisedb.com> <20221005185716.GB201192@nathanxps13> <1d9cb989-91b0-919e-f42b-4788f5fc7911@enterprisedb.com> <20221013182408.GA1551106@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Thu, 13 Oct 2022 11:24:08 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1061702.1665687218.1@sss.pgh.pa.us> Date: Thu, 13 Oct 2022 14:53:38 -0400 Message-ID: <1061703.1665687218@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Thu, Oct 13, 2022 at 03:25:27PM +0530, Bharath Rupireddy wrote: >> The intent here looks reasonable to me. However, why should the user >> be able to set both archive_command and archive_library in the first >> place only to later fail in LoadArchiveLibrary() per the patch? IMO, >> the check_hook() is the right way to disallow any sorts of GUC >> misconfigurations, no? > There was some discussion upthread about using the GUC hooks to enforce > this [0]. In general, it doesn't seem to be a recommended practice. Yeah, it really does not work to use GUC hooks to enforce multi-variable constraints. We've learned that the hard way (more than once, if memory serves). regards, tom lane