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 1oExVN-0000Fw-E2 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Jul 2022 18:36:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oExVL-0007rs-W9 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Jul 2022 18:36:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oExVL-0007ri-HU for pgsql-hackers@lists.postgresql.org; Fri, 22 Jul 2022 18:36:03 +0000 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oExVI-0006Og-F9 for pgsql-hackers@lists.postgresql.org; Fri, 22 Jul 2022 18:36:02 +0000 Received: by mail-qv1-xf29.google.com with SMTP id i13so4055354qvo.3 for ; Fri, 22 Jul 2022 11:36:00 -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; bh=lRsNtYmIs9/SWn49lugvmPE46NwnZQkoATh0wr6bITY=; b=S/H0jurQpS2SA/ciRXAtmQUmNGqOU/Sf1olahOZKoKHAfx8T+TDpVyuaRnGO6FBUEd cXIetTzjI+Zt525EpoYXIwlkOciP2Vz6W34uApbCSopstpr9YtB4TmEyTnjKUY+4zMpM tP+xXcERJyrWjt/yHJmv0rwFMFmtQGK4xCIFgOxG0TEh40xm2c9C5WvumS26kjvsZSOr 0OaDLDmGeRwbRB3GI1w/MnNCSVb1c/LA06iPFUlBjBcPmy5JRtn9NYkB9cl1AZCDdHLE 6zRFtFjLmznceeTmINtuI77Acj5nSmebttLDNIlidgrDrshQISTfy+PJtHB8Z8Ns+Mg4 etBg== 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; bh=lRsNtYmIs9/SWn49lugvmPE46NwnZQkoATh0wr6bITY=; b=TFGIsAFuex/U5jrh73bLng78DhUA2lH+8e3BkwdyY67SVR8lbzETb6v3vgA6bFUav3 lW1BIWEt8e3oI/x/5rBWGhFrOE4ihEDkqA+BJmmaE9ekIA4nXjVhF/z8j9LX1/TFWFr8 dFCmEGUiMLQM5s/BXeDBFLtJjJHhCDae7tpSJXTIww6yJvLdSEqmVXMbYOaRTcvYDls+ /m7yI7d2lUGdMlj9TwRpEywUKoOKINbGch5cVKHFTomzILtpJfHuFaT7ojYvieFQnce0 MMez8oZp5Da0UBaTz2kpraWqa9tywau3rqNVoTNx5MxBV/J5QyIRirbwVJ3ICcOiLGJK cdww== X-Gm-Message-State: AJIora+oID6ia4jQxCTaFK3Y+ggwpm08d1ZBRLbxAcAk+U0vGer4EIaY C+mQljlVOZ1TozGDLvTEi56fsA== X-Google-Smtp-Source: AGRyM1t5FqNPXFa9EQWnHrlBeyr8Ea8LiWGh1H2sTcws3y4lje+9UMz08t+O/uuav/pCPMkFmNPQAg== X-Received: by 2002:a05:6214:624:b0:473:27e8:95d6 with SMTP id a4-20020a056214062400b0047327e895d6mr1288519qvx.109.1658514959320; Fri, 22 Jul 2022 11:35:59 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id x8-20020a05620a12a800b006b5b7a8e6a2sm3462388qki.23.2022.07.22.11.35.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jul 2022 11:35:58 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id EBF9C800827; Fri, 22 Jul 2022 13:35:57 -0500 (CDT) Date: Fri, 22 Jul 2022 13:35:57 -0500 From: Justin Pryzby To: Tom Lane Cc: Maciek Sakrejda , Robert Haas , "David G. Johnston" , Bharath Rupireddy , pgsql-hackers@lists.postgresql.org Subject: Re: warn if GUC set to an invalid shared library Message-ID: <20220722183557.GC7789@telsasoft.com> References: <164378196169.19783.12147751717180735532.pgcf@coridan.postgresql.org> <20220210015854.GV31460@telsasoft.com> <20220722015412.GA7789@telsasoft.com> <675610.1658512401@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <675610.1658512401@sss.pgh.pa.us> 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 Fri, Jul 22, 2022 at 01:53:21PM -0400, Tom Lane wrote: > > 2022-07-22 10:37:50.217 PDT [1131187] LOG: database system is shut down > > 2022-07-22 10:37:50.306 PDT [1134058] WARNING: could not access file "$libdir/plugins/lol" > > 2022-07-22 10:37:50.306 PDT [1134058] DETAIL: The server will currently fail to start with this setting. > > 2022-07-22 10:37:50.306 PDT [1134058] HINT: If the server is shut down, it will be necessary to manually edit the postgresql.auto.conf file to allow it to start again. > > 2022-07-22 10:37:50.312 PDT [1134058] FATAL: could not access file "lol": No such file or directory > > 2022-07-22 10:37:50.312 PDT [1134058] CONTEXT: while loading shared libraries for setting "shared_preload_libraries" from /home/maciek/code/aux/postgres/tmpdb/postgresql.auto.conf:3 > > 2022-07-22 10:37:50.312 PDT [1134058] LOG: database system is shut down > > > Hmm, I guess this is a side effect of where these messages are > > emitted, but at this point, lines 4-6 here are a little confusing, no? > > This indicates that the warning is being issued in the wrong place. > It's okay if it comes out during ALTER SYSTEM. It's not okay if it > comes out during server start; then it's just an annoyance. This was a regression from the previous patch version, and I even noticed the problem, but then forgot when returning to the patch :( The previous patch version checked if (!IsUnderPostmaster()) before warning. Is there a better way ? ALTER SYSTEM uses PGC_S_FILE, the same as during startup.. -- Justin