Blame SOURCES/libecpg-10.5-var-run-socket.patch

98de3a
Change the built-in default socket directory to be /var/run/postgresql.
98de3a
For backwards compatibility with (probably non-libpq-based) clients that
98de3a
might still expect to find the socket in /tmp, also create a socket in
98de3a
/tmp.  This is to resolve communication problems with clients operating
98de3a
under systemd's PrivateTmp environment, which won't be using the same
98de3a
global /tmp directory as the server; see bug #825448.
98de3a
98de3a
Note that we apply the socket directory change at the level of the
98de3a
hard-wired defaults in the C code, not by just twiddling the setting in
98de3a
postgresql.conf.sample; this is so that the change will take effect on
98de3a
server package update, without requiring any existing postgresql.conf
98de3a
to be updated.  (Of course, a user who dislikes this behavior can still
98de3a
override it via postgresql.conf.)
98de3a
98de3a
diff -up postgresql-13.0/src/include/pg_config_manual.h.patch1 postgresql-13.0/src/include/pg_config_manual.h
98de3a
--- postgresql-13.0/src/include/pg_config_manual.h.patch1	2020-10-23 10:18:12.204959024 +0200
98de3a
+++ postgresql-13.0/src/include/pg_config_manual.h	2020-10-23 10:18:39.391208931 +0200
98de3a
@@ -201,7 +201,7 @@
98de3a
  * support them yet.
98de3a
  */
98de3a
 #ifndef WIN32
98de3a
-#define DEFAULT_PGSOCKET_DIR  "/tmp"
98de3a
+#define DEFAULT_PGSOCKET_DIR  "/var/run/postgresql"
98de3a
 #else
98de3a
 #define DEFAULT_PGSOCKET_DIR ""
98de3a
 #endif