Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrei Klychkov <andrew.a.klychkov@gmail.com>
Cc: Jim Jones <jim.jones@uni-muenster.de>,
Fujii Masao <masao.fujii@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-11-01T20:11:46Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow "SET list_guc TO NULL" to specify setting the GUC to empty.
- ff4597acd4c3 19 (unreleased) landed
Attachments
- v6-0001-Allow-SET-list_guc-TO-NULL-to-specify-setting-the.patch (text/x-diff) patch v6-0001
Andrei Klychkov <andrew.a.klychkov@gmail.com> writes: > Looks like the patch v5 resolves a long-standing limitation where there was > no SQL syntax to set a list-based GUC to an empty list. I like this > approach. Also the changes seem non-breaking. Thanks > 1. Would be great to have some explanations in docs about this new behavior. Yeah, I hadn't bothered with docs, pending decisions about which way we were going to implement this. But it seems like we're leaning towards using the NULL syntax, so I went ahead and did some docs work. > 2. It doesn't look to me that v5 solves the original issue of a user > running ALTER SYSTEM SET <setting like shared_preload_libraries> = ''; , > 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. What this patch is meant to do is provide a valid way to accomplish what you wanted, namely ALTER SYSTEM SET shared_preload_libraries = NULL; 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. I'm not sure if we want to change anything about this in config.sgml. There are enough GUC_LIST_INPUT GUCs that I can't see mentioning it for each one. regards, tom lane