aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/pg_regress.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 14bf2224f77..abde5b477c6 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -109,7 +109,6 @@ static const char *progname;
static char *logfilename;
static FILE *logfile;
static char *difffilename;
-static char *sockdir;
static _resultmap *resultmap = NULL;
@@ -759,7 +758,8 @@ initialize_environment(void)
* the wrong postmaster, or otherwise behave in nondefault ways. (Note
* we also use psql's -X switch consistently, so that ~/.psqlrc files
* won't mess things up.) Also, set PGPORT to the temp port, and set
- * PGHOST depending on whether we are using TCP or Unix sockets.
+ * or unset PGHOST depending on whether we are using TCP or Unix
+ * sockets.
*/
unsetenv("PGDATABASE");
unsetenv("PGUSER");
@@ -771,23 +771,7 @@ initialize_environment(void)
if (hostname != NULL)
doputenv("PGHOST", hostname);
else
- {
- sockdir = getenv("PG_REGRESS_SOCK_DIR");
- if (!sockdir)
- {
- /*
- * Since initdb creates the data directory with secure
- * permissions, we place the socket there. This ensures no
- * other OS user can open our socket to exploit our use of
- * trust authentication. Compared to using the compiled-in
- * DEFAULT_PGSOCKET_DIR, this also permits testing to work in
- * builds that relocate it to a directory not writable to the
- * build/test user.
- */
- sockdir = psprintf("%s/data", temp_install);
- }
- doputenv("PGHOST", sockdir);
- }
+ unsetenv("PGHOST");
unsetenv("PGHOSTADDR");
if (port != -1)
{
@@ -2281,11 +2265,10 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
*/
header(_("starting postmaster"));
snprintf(buf, sizeof(buf),
- SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s "
- "-c \"listen_addresses=%s\" -k \"%s\" "
- "> \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE,
- bindir, temp_install, debug ? " -d 5" : "",
- hostname ? hostname : "", sockdir ? sockdir : "",
+ 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 : "",
outputdir);
postmaster_pid = spawn_process(buf);
if (postmaster_pid == INVALID_PID)