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 1opUsz-0000fo-Oo for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Oct 2022 13:31:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1opUsy-0001Hj-N0 for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Oct 2022 13:31:28 +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 1opUsy-0001Ha-9t for pgsql-hackers@lists.postgresql.org; Mon, 31 Oct 2022 13:31:28 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1opUsw-00014q-1B for pgsql-hackers@lists.postgresql.org; Mon, 31 Oct 2022 13:31:27 +0000 Received: by mail-io1-xd35.google.com with SMTP id z3so9724096iof.3 for ; Mon, 31 Oct 2022 06:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=8/oinsZEQ+noirdKjetHi+9cBCXKOEgEDEE0dV8mqYU=; b=4TDnHVPSN/jmtYF0XwpmjCTHp3Fz2M4rAiiMnfmFpyfZKsCmRLaFZHPz4c7DaB9K8G Uzf1p/svex/WpCV31Cn2UGkqhaEPy40CeyG73W/yQX2XmQEXhuBPn/VztgsRcOXWV3tB V7YtkfGrNGkvKuPSn35/FJpeZDQMaq2xkb75sNLUdUHLHFxxgxxdRbFdaCsmj0kBO8xU Q194Fz1iQKUew1Q8pR/meAeyuVTGUIzqPtCUslFgtQeNIFi7aVzW/ckCVYVVWZKtOzxF XVQ1MBjcmqIkM5zmzwgZl6ICu9MHXKXpPpoDQkmFEQx4rY6n+5Wn0oB3NmGdwHvi8puL BF2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8/oinsZEQ+noirdKjetHi+9cBCXKOEgEDEE0dV8mqYU=; b=RGbXsPdvDMVXzdimWGJfmrOOudEnjkf/NbgWgyntfHmD78Z05Mk90k9iDLBGaeCIL5 kq/VguMHZ5zt+53Q7C5yeBL7C2oEf4iyR1vSBBGS5b5hQ9+24NYu9jp0tTuNFHuI4gwQ D/LksC87mXl/UC75QhkSWei3mj5qDIau0xcaBJ7fC2UXgJNh+jraoc55jZnAypQmeHPz bSbapJON+c5B0Penb8MZhVnxCXI+Osd7Fh/dls98AcTjp+FC58NXQSJbdK2VbAxmdGrt ZYawgEnLLKMw5aWQosh1yQRBU+ZYEk1Uw+d5LD37hUftct5hUQHjgAdF3Iht3Q3n0cFR O0cw== X-Gm-Message-State: ACrzQf3CuMKST0eQN1hPaGFfAfgY8vGdLHHhOEVnj7dvpWNoy0Wf11R+ uNJU6BMxe8ZfW0fwrtWnki5e7w== X-Google-Smtp-Source: AMsMyM4On1okgKZgPz/hx9SoMoLV8+FmBwM7qLP3AjYJnFzaRGCRIL74kH8NSkAewHnLIkTfcyMeFQ== X-Received: by 2002:a05:6638:f84:b0:375:4dda:d5dc with SMTP id h4-20020a0566380f8400b003754ddad5dcmr4571318jal.40.1667223082588; Mon, 31 Oct 2022 06:31:22 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id t18-20020a922c12000000b002f165ceb09bsm2551719ile.64.2022.10.31.06.31.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Oct 2022 06:31:22 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 1A2B8800BCE; Mon, 31 Oct 2022 08:31:21 -0500 (CDT) Date: Mon, 31 Oct 2022 08:31:20 -0500 From: Justin Pryzby To: Maciek Sakrejda Cc: Tom Lane , Robert Haas , "David G. Johnston" , Bharath Rupireddy , Cary Huang , pgsql-hackers@lists.postgresql.org Subject: Re: warn if GUC set to an invalid shared library Message-ID: <20221031133120.GO16921@telsasoft.com> References: <20220722015412.GA7789@telsasoft.com> <675610.1658512401@sss.pgh.pa.us> <20220722183557.GC7789@telsasoft.com> <729940.1658516423@sss.pgh.pa.us> <20220722191443.GE7789@telsasoft.com> <734432.1658518007@sss.pgh.pa.us> <20220902222458.GC31833@telsasoft.com> <20221029174053.GA19704@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Oct 30, 2022 at 04:12:33PM -0700, Maciek Sakrejda wrote: > On Sat, Oct 29, 2022 at 10:40 AM Justin Pryzby wrote: > > > > On Fri, Sep 02, 2022 at 05:24:58PM -0500, Justin Pryzby wrote: > > > It caused no issue when I changed: > > > > > > /* Check that it's acceptable for the indicated parameter */ > > > if (!parse_and_validate_value(record, name, value, > > > - PGC_S_FILE, ERROR, > > > + PGC_S_TEST, ERROR, > > > &newval, &newextra)) > > > > > > I'm not sure where to go from here. > > > > I'm hoping for some guidance ; this simple change may be naive, but I'm not > > sure what a wider change would look like. > > I assume you mean guidance on implementation details here, and not on ALTER SYSTEM tests the new/proposed setting using PGC_S_FILE ("which is a lie"). It seems better to address that lie before attempting to change the behavior of *_preload_libraries. PGC_S_TEST is a better fit, so my question is whether it's really that simple ? > Also, for what it's worth, I think requiring the libraries to be in > place before running ALTER SYSTEM does not really seem that onerous. I > can't really think of use cases it precludes. Right now, it's allowed to set the GUC before installing the shlib. That's a supported case (see the 11 month old messages toward the beginning of this thread). -- Justin