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 1oEwq8-00066u-3H for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Jul 2022 17:53:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oEwq6-0004AJ-NA for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Jul 2022 17:53:26 +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 1oEwq6-0004AA-Dh for pgsql-hackers@lists.postgresql.org; Fri, 22 Jul 2022 17:53:26 +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 1oEwq4-0003ZO-49 for pgsql-hackers@lists.postgresql.org; Fri, 22 Jul 2022 17:53:26 +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 26MHrLUP675611; Fri, 22 Jul 2022 13:53:21 -0400 From: Tom Lane To: Maciek Sakrejda cc: Justin Pryzby , Robert Haas , "David G. Johnston" , Bharath Rupireddy , PostgreSQL Hackers Subject: Re: warn if GUC set to an invalid shared library In-reply-to: References: <164378196169.19783.12147751717180735532.pgcf@coridan.postgresql.org> <20220210015854.GV31460@telsasoft.com> <20220722015412.GA7789@telsasoft.com> Comments: In-reply-to Maciek Sakrejda message dated "Fri, 22 Jul 2022 10:42:11 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <675609.1658512401.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 22 Jul 2022 13:53:21 -0400 Message-ID: <675610.1658512401@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Maciek Sakrejda writes: >> I've started to think that we should really WARN whenever a (set of) GU= C is set >> in a manner that the server will fail to start - not just for shared li= braries. > +0.5. I think it's a reasonable change, but I've never broken my > server with anything other than shared_preload_libraries, so I'd > rather see an improvement here first rather than expanding scope. Generally speaking, anything that tries to check a combination of GUC settings is going to be so fragile as to be worthless. We've learned that lesson the hard way in the past. > 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. regards, tom lane