X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=socket-dir-fixes.patch;fp=socket-dir-fixes.patch;h=37f9d8d5a8a932431dd34fe2cb0182fd807757f8;hb=165b6ec87faefd2c99abe3369abc15c5633b446f;hp=0000000000000000000000000000000000000000;hpb=51f8e372987ff5a289c6fa664e3045736ae536cc;p=packages%2Fpostgresql.git diff --git a/socket-dir-fixes.patch b/socket-dir-fixes.patch new file mode 100644 index 0000000..37f9d8d --- /dev/null +++ b/socket-dir-fixes.patch @@ -0,0 +1,27 @@ +diff -urpa postgresql-9.4.19.orig/contrib/pg_upgrade/option.c postgresql-9.4.19/contrib/pg_upgrade/option.c +--- postgresql-9.4.19.orig/contrib/pg_upgrade/option.c 2018-08-23 18:44:23.000449908 +0000 ++++ postgresql-9.4.19/contrib/pg_upgrade/option.c 2018-08-23 18:45:59.397448823 +0000 +@@ -422,6 +422,11 @@ get_sock_dir(ClusterInfo *cluster, bool + cluster->sockdir = pg_malloc(MAXPGPATH); + if (!getcwd(cluster->sockdir, MAXPGPATH)) + pg_fatal("cannot find current directory\n"); ++#ifndef UNIX_PATH_MAX ++#define UNIX_PATH_MAX 108 ++#endif ++ if (strlen(cluster->sockdir) > UNIX_PATH_MAX - sizeof(".s.PGSQL.50432")) ++ strcpy(cluster->sockdir, "/tmp"); /* fall back to tmp */ + } + else + { +diff -urpa postgresql-9.4.19.orig/src/include/pg_config_manual.h postgresql-9.4.19/src/include/pg_config_manual.h +--- postgresql-9.4.19.orig/src/include/pg_config_manual.h 2018-08-23 18:44:23.004449908 +0000 ++++ postgresql-9.4.19/src/include/pg_config_manual.h 2018-08-23 18:46:23.657448550 +0000 +@@ -152,7 +152,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" + + /* + * The random() function is expected to yield values between 0 and