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

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