diff -ruN postgresql-7.4.13-old/src/include/pg_config_manual.h postgresql-7.4.13/src/include/pg_config_manual.h
--- postgresql-7.4.13-old/src/include/pg_config_manual.h	2003-08-04 01:43:29.000000000 +0100
+++ postgresql-7.4.13/src/include/pg_config_manual.h	2003-08-29 17:11:23.000000000 +0100
@@ -157,7 +157,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
