summaryrefslogtreecommitdiff
path: root/src/include/pg_config_manual.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-01-31 16:26:12 +0100
committerPeter Eisentraut <peter@eisentraut.org>2020-01-31 16:28:43 +0100
commita9cff89f7e638c060621a62ca35da97a12adde42 (patch)
tree733f5f5cbc7af6abf965ae40c1139fffda0bf6ab /src/include/pg_config_manual.h
parent7c23bfd25c423b4513a16d41c5e4d09c32807155 (diff)
Allow building without default socket directory
We have code paths for Unix socket support and no Unix socket support. Now add a third variant: Unix socket support but do not use a Unix socket by default in the client or the server, only if you explicitly specify one. This will be useful when we enable Unix socket support on Windows. To implement this, tweak things so that setting DEFAULT_PGSOCKET_DIR to "" has the desired effect. This mostly already worked like that; only a few places needed to be adjusted. Notably, the reference to DEFAULT_PGSOCKET_DIR in UNIXSOCK_PATH() could be removed because all callers already resolve an empty socket directory setting with a default if appropriate. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/75f72249-8ae6-322a-63df-4fe03eeccb9f@2ndquadrant.com
Diffstat (limited to 'src/include/pg_config_manual.h')
-rw-r--r--src/include/pg_config_manual.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index 569af6997cc..b4ce53300b3 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -191,6 +191,11 @@
* directory. But if you just hate the idea of sockets in /tmp,
* here's where to twiddle it. You can also override this at runtime
* with the postmaster's -k switch.
+ *
+ * If set to an empty string, then AF_UNIX sockets are not used by default: A
+ * server will not create an AF_UNIX socket unless the run-time configuration
+ * is changed, a client will connect via TCP/IP by default and will only use
+ * an AF_UNIX socket if one is explicitly specified.
*/
#define DEFAULT_PGSOCKET_DIR "/tmp"