2023-08-07 15:16:14 +02:00
|
|
|
Change the built-in default socket directory to be /run/postgresql.
|
2023-08-07 17:18:00 +02:00
|
|
|
This is to resolve communication problems with clients operating
|
2023-08-07 15:16:14 +02:00
|
|
|
under systemd's PrivateTmp environment, which won't be using the same
|
|
|
|
global /tmp directory as the server; see bug #825448.
|
|
|
|
|
|
|
|
Note that we apply the socket directory change at the level of the
|
|
|
|
hard-wired defaults in the C code, not by just twiddling the setting in
|
|
|
|
postgresql.conf.sample; this is so that the change will take effect on
|
|
|
|
server package update, without requiring any existing postgresql.conf
|
|
|
|
to be updated. (Of course, a user who dislikes this behavior can still
|
|
|
|
override it via postgresql.conf.)
|
|
|
|
|
|
|
|
|
|
|
|
Index: src/include/pg_config_manual.h
|
|
|
|
===================================================================
|
|
|
|
--- src/include/pg_config_manual.h.orig
|
|
|
|
+++ src/include/pg_config_manual.h
|
|
|
|
@@ -224,7 +224,7 @@
|
|
|
|
* support them yet.
|
|
|
|
*/
|
|
|
|
#ifndef WIN32
|
|
|
|
-#define DEFAULT_PGSOCKET_DIR "/tmp"
|
2023-08-07 17:18:00 +02:00
|
|
|
+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
|
2023-08-07 15:16:14 +02:00
|
|
|
#else
|
|
|
|
#define DEFAULT_PGSOCKET_DIR ""
|
|
|
|
#endif
|