--- src/include/pg_config_manual.h
+++ src/include/pg_config_manual.h
@@ -144,7 +144,7 @@
  * here's where to twiddle it.  You can also override this at runtime
  * with the postmaster's -k switch.
  */
-#define DEFAULT_PGSOCKET_DIR  "/tmp"
+#define DEFAULT_PGSOCKET_DIR  "/var/run"
 
 /*
  * The random() function is expected to yield values between 0 and