@@ -109,7 +109,6 @@ static const char *progname;
109
109
static char * logfilename ;
110
110
static FILE * logfile ;
111
111
static char * difffilename ;
112
- static char * sockdir ;
113
112
114
113
static _resultmap * resultmap = NULL ;
115
114
@@ -769,7 +768,8 @@ initialize_environment(void)
769
768
* the wrong postmaster, or otherwise behave in nondefault ways. (Note
770
769
* we also use psql's -X switch consistently, so that ~/.psqlrc files
771
770
* won't mess things up.) Also, set PGPORT to the temp port, and set
772
- * PGHOST depending on whether we are using TCP or Unix sockets.
771
+ * or unset PGHOST depending on whether we are using TCP or Unix
772
+ * sockets.
773
773
*/
774
774
unsetenv ("PGDATABASE" );
775
775
unsetenv ("PGUSER" );
@@ -781,24 +781,7 @@ initialize_environment(void)
781
781
if (hostname != NULL )
782
782
doputenv ("PGHOST" ,hostname );
783
783
else
784
- {
785
- sockdir = getenv ("PG_REGRESS_SOCK_DIR" );
786
- if (!sockdir )
787
- {
788
- /*
789
- * Since initdb creates the data directory with secure
790
- * permissions, we place the socket there. This ensures no
791
- * other OS user can open our socket to exploit our use of
792
- * trust authentication. Compared to using the compiled-in
793
- * DEFAULT_PGSOCKET_DIR, this also permits testing to work in
794
- * builds that relocate it to a directory not writable to the
795
- * build/test user.
796
- */
797
- sockdir = malloc (strlen (temp_install )+ sizeof ("/data" ));
798
- sprintf (sockdir ,"%s/data" ,temp_install );
799
- }
800
- doputenv ("PGHOST" ,sockdir );
801
- }
784
+ unsetenv ("PGHOST" );
802
785
unsetenv ("PGHOSTADDR" );
803
786
if (port != -1 )
804
787
{
@@ -2270,11 +2253,10 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
2270
2253
*/
2271
2254
header (_ ("starting postmaster" ));
2272
2255
snprintf (buf ,sizeof (buf ),
2273
- SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s "
2274
- "-c \"listen_addresses=%s\" -k \"%s\" "
2275
- "> \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE ,
2276
- bindir ,temp_install ,debug ?" -d 5" :"" ,
2277
- hostname ?hostname :"" ,sockdir ?sockdir :"" ,
2256
+ SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE ,
2257
+ bindir ,temp_install ,
2258
+ debug ?" -d 5" :"" ,
2259
+ hostname ?hostname :"" ,
2278
2260
outputdir );
2279
2261
postmaster_pid = spawn_process (buf );
2280
2262
if (postmaster_pid == INVALID_PID )