Hi, Debian has been patching pg_regress for years because our default unix socket directory is /var/run/postgresql, but that is not writable by the build user at build time. This used to be a pretty ugly "make- patch-make check-unpatch-make install" patch dance, but now it is a pretty patch that makes pg_regress accept --host=/tmp.
The patch is already part of the .deb files on apt.postgresql.org and passes all regression test suites there. Please consider it for 9.3. (And maybe backpatch it all the way...) Christoph -- c...@df7cb.de | http://www.df7cb.de/
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c new file mode 100644 index b632326..d4d4279 *** a/src/test/regress/pg_regress.c --- b/src/test/regress/pg_regress.c *************** initialize_environment(void) *** 835,840 **** --- 835,841 ---- { const char *pghost; const char *pgport; + char pgportstr[32]; /* * When testing an existing install, we honor existing environment *************** initialize_environment(void) *** 865,878 **** pghost = "localhost"; #endif ! if (pghost && pgport) ! printf(_("(using postmaster on %s, port %s)\n"), pghost, pgport); ! if (pghost && !pgport) ! printf(_("(using postmaster on %s, default port)\n"), pghost); ! if (!pghost && pgport) ! printf(_("(using postmaster on Unix socket, port %s)\n"), pgport); ! if (!pghost && !pgport) ! printf(_("(using postmaster on Unix socket, default port)\n")); } convert_sourcefiles(); --- 866,883 ---- pghost = "localhost"; #endif ! /* Precompute the "port xxx" part so we don't have 6 printf()s below */ ! if (pgport) ! snprintf(pgportstr, sizeof(pgportstr), _("port %s"), pgport); ! else ! snprintf(pgportstr, sizeof(pgportstr), _("default port")); ! ! if (pghost && *pghost != '/') ! printf(_("(using postmaster on %s, %s)\n"), pghost, pgportstr); ! else if (pghost) ! printf(_("(using postmaster on Unix socket %s, %s)\n"), pghost, pgportstr); ! else ! printf(_("(using postmaster on Unix socket, %s)\n"), pgportstr); } convert_sourcefiles(); *************** regression_main(int argc, char *argv[], *** 2249,2255 **** */ header(_("starting postmaster")); snprintf(buf, sizeof(buf), ! SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE, bindir, temp_install, debug ? " -d 5" : "", hostname ? hostname : "", --- 2254,2262 ---- */ header(_("starting postmaster")); snprintf(buf, sizeof(buf), ! hostname && *hostname == '/' ! ? SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s -k \"%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE ! : SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE, bindir, temp_install, debug ? " -d 5" : "", hostname ? hostname : "",
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers