1 diff -urpa postgresql-9.3.24.orig/contrib/pg_upgrade/option.c postgresql-9.3.24/contrib/pg_upgrade/option.c
2 --- postgresql-9.3.24.orig/contrib/pg_upgrade/option.c 2018-08-23 19:56:17.181401335 +0000
3 +++ postgresql-9.3.24/contrib/pg_upgrade/option.c 2018-08-23 19:59:38.729399066 +0000
4 @@ -411,6 +411,11 @@ get_sock_dir(ClusterInfo *cluster, bool
5 cluster->sockdir = pg_malloc(MAXPGPATH);
6 if (!getcwd(cluster->sockdir, MAXPGPATH))
7 pg_log(PG_FATAL, "cannot find current directory\n");
9 +#define UNIX_PATH_MAX 108
11 + if (strlen(cluster->sockdir) > UNIX_PATH_MAX - sizeof(".s.PGSQL.50432"))
12 + strcpy(cluster->sockdir, "/tmp"); /* fall back to tmp */
16 diff -urpa postgresql-9.3.24.orig/src/include/pg_config_manual.h postgresql-9.3.24/src/include/pg_config_manual.h
17 --- postgresql-9.3.24.orig/src/include/pg_config_manual.h 2018-08-23 19:56:17.195401335 +0000
18 +++ postgresql-9.3.24/src/include/pg_config_manual.h 2018-08-23 19:59:34.340399115 +0000
20 * here's where to twiddle it. You can also override this at runtime
21 * with the postmaster's -k switch.
23 -#define DEFAULT_PGSOCKET_DIR "/tmp"
24 +#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql"
27 * The random() function is expected to yield values between 0 and