1 --- postgresql-15.2/src/bin/pg_upgrade/option.c 2023-03-07 23:37:50.271950638 +0100
2 +++ postgresql-15.2/src/bin/pg_upgrade/option.c 2023-03-07 23:40:28.343899006 +0100
4 get_sock_dir(ClusterInfo *cluster, bool live_check)
6 #if defined(HAVE_UNIX_SOCKETS) && !defined(WIN32)
9 cluster->sockdir = user_opts.socketdir;
10 +#ifndef UNIX_PATH_MAX
11 +#define UNIX_PATH_MAX 108
13 + if (strlen(cluster->sockdir) >= UNIX_PATH_MAX - sizeof(".s.PGSQL.50432"))
14 + strcpy(cluster->sockdir, "/tmp"); /* fall back to tmp */
19 --- postgresql-15.2/src/include/pg_config_manual.h 2023-03-07 23:37:50.153949183 +0100
20 +++ postgresql-15.2/src/include/pg_config_manual.h 2023-03-07 23:38:28.898426739 +0100
25 -#define DEFAULT_PGSOCKET_DIR "/tmp"
26 +#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql"
28 #define DEFAULT_PGSOCKET_DIR ""