diff -ruN postgresql-7.4.8-old/src/include/pg_config_manual.h postgresql-7.4.8/src/include/pg_config_manual.h
--- postgresql-7.4.8-old/src/include/pg_config_manual.h	2003-09-21 19:57:21.000000000 +0200
+++ postgresql-7.4.8/src/include/pg_config_manual.h	2005-06-14 18:52:02.000000000 +0200
@@ -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/postgresql"
 
 /*
  * Defining this will make float4 and float8 operations faster by
