--- src/include/pg_config_manual.h
+++ src/include/pg_config_manual.h
@@ -165,7 +165,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"
 
 /*
  * Defining this will make float4 and float8 operations faster by