1diff --git i/src/include/pg_config_manual.h w/src/include/pg_config_manual.h
2index 8f3ec6bde1..4fc01e4a0a 100644
3--- i/src/include/pg_config_manual.h
4+++ w/src/include/pg_config_manual.h
5@@ -201,7 +201,7 @@
6 * support them yet.
7 */
8 #ifndef WIN32
9-#define DEFAULT_PGSOCKET_DIR "/tmp"
10+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
11 #else
12 #define DEFAULT_PGSOCKET_DIR ""
13 #endif