Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vGKMA-00CZsK-KK for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2025 16:58:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vGKM9-00FHSv-JG for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2025 16:58:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vGKM9-00FHSj-9m for pgsql-hackers@lists.postgresql.org; Tue, 04 Nov 2025 16:58:04 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vGKM6-005Qzd-1h for pgsql-hackers@lists.postgresql.org; Tue, 04 Nov 2025 16:58:03 +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 5A4Gw0TU541350; Tue, 4 Nov 2025 11:58:00 -0500 From: Tom Lane To: Andrei Klychkov cc: Jim Jones , Fujii Masao , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters In-reply-to: <117311.1762027906@sss.pgh.pa.us> References: <38091678-2820-4bc8-8df7-b417562f7860@uni-muenster.de> <1046095.1757007639@sss.pgh.pa.us> <1056071.1757010288@sss.pgh.pa.us> <1235943.1757022769@sss.pgh.pa.us> <12e88f4f-82f0-4153-ab19-7f1c5f317912@uni-muenster.de> <1528424.1757106377@sss.pgh.pa.us> <117311.1762027906@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 01 Nov 2025 16:11:46 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <541348.1762275480.1@sss.pgh.pa.us> Date: Tue, 04 Nov 2025 11:58:00 -0500 Message-ID: <541349.1762275480@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Andrei Klychkov writes: >> 2. It doesn't look to me that v5 solves the original issue of a user >> running ALTER SYSTEM SET = ''; , >> then restarting the server and not getting it back online. > [ shrug... ] It's not supposed to "solve" that. That command is > erroneous, and if you didn't test the setting before restarting the > server, you shouldn't be too surprised if restart fails. If you are feeling excited about that specific case, I think the correct solution would be to install a GUC check_hook for shared_preload_libraries (and probably its siblings too). It couldn't go so far as to actually dlopen() the list items, but it could check that each one resolves as an accessible file. A potential objection is that this could result in unwanted failures in some scenarios, say where you're restoring a dump and haven't yet installed all the relevant extensions. I'm not quite sure if there are realistic scenarios where that's actually a problem. If it is, perhaps we could adjust the check_hook so it issues WARNINGs not hard errors. I'm not sure it's worth the trouble though. A quick look at dfmgr.c suggests that it'd take quite a lot of refactoring (or else code duplication, not good) to be able to apply the library lookup process without actually doing dlopen. In any case that would be a totally different patch from what we are discussing here. > Anyway, the attached v6 is the same as v5, except now with proposed > doc changes and a draft commit message. I spent some effort on > getting the ALTER SYSTEM and SET ref pages back into sync; it seemed > like more care has been taken with the ALTER SYSTEM synopsis and > other details. Hearing no further comments, I'm going to go ahead with v6. regards, tom lane