On Wed, Nov 04, 2020 at 10:47:43AM -0500, Tom Lane wrote:
> I do not think that that's a fatal objection.  I doubt anyone has
> applications that are automatically issuing that sort of command and
> would be broken by a change.  I think backwards compatibility is
> sufficiently met if the behavior remains the same for existing
> postgresql.conf entries, which AFAICT it would.

OK.  As far as I know, we parse this variable the same way, so this
case would be satisfied.

> Arguably, the whole point of doing something here is to make ALTER
> SYSTEM handle this variable more sensibly.  In that context,
> '/tmp/sock1, /tmp/sock2' *should* be taken as one item IMO.
> We can't change the behavior without, um, changing the behavior.

No arguments against this point either.  If you consider all that, the
switch can be done with the attached, with the change for pg_dump
included.  I have reorganized the list in variable_is_guc_list_quote()
alphabetically while on it.

Robert, is your previous question answered?
--
Michael
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index a62d64eaa4..bb34630e8e 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -4173,7 +4173,7 @@ static struct config_string ConfigureNamesString[] =
 		{"unix_socket_directories", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
 			gettext_noop("Sets the directories where Unix-domain sockets will be created."),
 			NULL,
-			GUC_SUPERUSER_ONLY
+			GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
 		},
 		&Unix_socket_directories,
 #ifdef HAVE_UNIX_SOCKETS
diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c
index 2d6ea13c45..536c9ffec8 100644
--- a/src/bin/pg_dump/dumputils.c
+++ b/src/bin/pg_dump/dumputils.c
@@ -865,11 +865,12 @@ buildACLQueries(PQExpBuffer acl_subquery, PQExpBuffer racl_subquery,
 bool
 variable_is_guc_list_quote(const char *name)
 {
-	if (pg_strcasecmp(name, "temp_tablespaces") == 0 ||
+	if (pg_strcasecmp(name, "local_preload_libraries") == 0 ||
+		pg_strcasecmp(name, "search_path") == 0 ||
 		pg_strcasecmp(name, "session_preload_libraries") == 0 ||
 		pg_strcasecmp(name, "shared_preload_libraries") == 0 ||
-		pg_strcasecmp(name, "local_preload_libraries") == 0 ||
-		pg_strcasecmp(name, "search_path") == 0)
+		pg_strcasecmp(name, "temp_tablespaces") == 0 ||
+		pg_strcasecmp(name, "unix_socket_directories") == 0)
 		return true;
 	else
 		return false;

Attachment: signature.asc
Description: PGP signature

Reply via email to