Re: warn if GUC set to an invalid shared library
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Maciek Sakrejda <m.sakrejda@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-28T14:42:17Z
Lists: pgsql-hackers
On Tue, Dec 28, 2021 at 12:45 PM Justin Pryzby <pryzby@telsasoft.com> wrote: > 0002 adds context when failing to start. > > 2021-12-27 17:01:12.996 CST postmaster[1403] WARNING: could not load library: $libdir/plugins/asdf: cannot open shared object file: No such file or directory > 2021-12-27 17:01:14.938 CST postmaster[1403] FATAL: could not access file "asdf": No such file or directory > 2021-12-27 17:01:14.938 CST postmaster[1403] CONTEXT: guc "shared_preload_libraries" > 2021-12-27 17:01:14.939 CST postmaster[1403] LOG: database system is shut down -1 from me on using "guc" in any user-facing error message. And even guc -> setting isn't a big improvement. If we're going to structure the reporting this way there, we should try to use a meaningful phrase there, probably beginning with the word "while"; see "git grep errcontext.*while" for interesting precedents. That said, that series of messages seems a bit suspect to me, because the WARNING seems to be stating the same problem as the subsequent FATAL and CONTEXT lines. Ideally we'd tighten that somehow. -- Robert Haas EDB: http://www.enterprisedb.com