diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-10-08 17:22:04 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-10-08 17:22:18 +0300 |
commit | fd8148250c8c46fac04277e7a07f8dd2908dd477 (patch) | |
tree | e4ba2001706d8ca09dc38cfa0fdf73eec0e17d97 /debian/patches/64-pg_upgrade-sockdir | |
download | postgresql-10-debian.tar.gz |
Imported postgresql-10 10.0-1debian/10.0-1debian
Diffstat (limited to 'debian/patches/64-pg_upgrade-sockdir')
-rw-r--r-- | debian/patches/64-pg_upgrade-sockdir | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/patches/64-pg_upgrade-sockdir b/debian/patches/64-pg_upgrade-sockdir new file mode 100644 index 0000000..60ed2b6 --- /dev/null +++ b/debian/patches/64-pg_upgrade-sockdir @@ -0,0 +1,18 @@ +Fix for: connection to database failed: Unix-domain socket path "/build/buildd-postgresql-9.3_9.3~beta1-1-i386-mHjRUH/postgresql-9.3-9.3~beta1/build/contrib/pg_upgrade/.s.PGSQL.50432" is too long (maximum 107 bytes) + +See also: http://lists.debian.org/debian-wb-team/2013/05/msg00015.html + +--- a/src/bin/pg_upgrade/option.c ++++ b/src/bin/pg_upgrade/option.c +@@ -460,6 +460,11 @@ get_sock_dir(ClusterInfo *cluster, bool + cluster->sockdir = pg_malloc(MAXPGPATH); + if (!getcwd(cluster->sockdir, MAXPGPATH)) + pg_fatal("could not determine 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 + { |