@@ -165,12 +165,13 @@ issue_warnings(char *sequence_script_file_name)
165
165
if (sequence_script_file_name )
166
166
{
167
167
prep_status ("Adjusting sequences" );
168
- exec_prog (true,
169
- SYSTEMQUOTE "\"%s/psql\" --set ON_ERROR_STOP=on "
168
+ exec_prog (true, true, UTILITY_LOG_FILE ,
169
+ SYSTEMQUOTE "\"%s/psql\" --echo-queries "
170
+ "--set ON_ERROR_STOP=on "
170
171
"--no-psqlrc --port %d --username \"%s\" "
171
- "-f \"%s\" --dbname template1 >> \"%s\"" SYSTEMQUOTE ,
172
+ "-f \"%s\" --dbname template1 >> \"%s\" 2>&1 " SYSTEMQUOTE ,
172
173
new_cluster .bindir , new_cluster .port , os_info .user ,
173
- sequence_script_file_name , log_opts . filename2 );
174
+ sequence_script_file_name , UTILITY_LOG_FILE );
174
175
unlink (sequence_script_file_name );
175
176
check_ok ();
176
177
}
@@ -393,10 +394,10 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
393
394
394
395
prep_status ("Creating script to delete old cluster" );
395
396
396
- snprintf (* deletion_script_file_name , MAXPGPATH , "%s/ delete_old_cluster.%s" ,
397
- os_info . cwd , SCRIPT_EXT );
397
+ snprintf (* deletion_script_file_name , MAXPGPATH , "delete_old_cluster.%s" ,
398
+ SCRIPT_EXT );
398
399
399
- if ((script = fopen (* deletion_script_file_name , "w" )) == NULL )
400
+ if ((script = fopen_priv (* deletion_script_file_name , "w" )) == NULL )
400
401
pg_log (PG_FATAL , "Could not open file \"%s\": %s\n" ,
401
402
* deletion_script_file_name , getErrorText (errno ));
402
403
@@ -541,8 +542,8 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
541
542
return ;
542
543
}
543
544
544
- snprintf (output_path , sizeof (output_path ), "%s/contrib_isn_and_int8_pass_by_value.txt" ,
545
- os_info . cwd );
545
+ snprintf (output_path , sizeof (output_path ),
546
+ "contrib_isn_and_int8_pass_by_value.txt" );
546
547
547
548
for (dbnum = 0 ; dbnum < cluster -> dbarr .ndbs ; dbnum ++ )
548
549
{
@@ -569,7 +570,7 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
569
570
for (rowno = 0 ; rowno < ntups ; rowno ++ )
570
571
{
571
572
found = true;
572
- if (script == NULL && (script = fopen (output_path , "w" )) == NULL )
573
+ if (script == NULL && (script = fopen_priv (output_path , "w" )) == NULL )
573
574
pg_log (PG_FATAL , "Could not open file \"%s\": %s\n" ,
574
575
output_path , getErrorText (errno ));
575
576
if (!db_used )
@@ -628,8 +629,7 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
628
629
629
630
prep_status ("Checking for reg* system OID user data types" );
630
631
631
- snprintf (output_path , sizeof (output_path ), "%s/tables_using_reg.txt" ,
632
- os_info .cwd );
632
+ snprintf (output_path , sizeof (output_path ), "tables_using_reg.txt" );
633
633
634
634
for (dbnum = 0 ; dbnum < cluster -> dbarr .ndbs ; dbnum ++ )
635
635
{
@@ -675,7 +675,7 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
675
675
for (rowno = 0 ; rowno < ntups ; rowno ++ )
676
676
{
677
677
found = true;
678
- if (script == NULL && (script = fopen (output_path , "w" )) == NULL )
678
+ if (script == NULL && (script = fopen_priv (output_path , "w" )) == NULL )
679
679
pg_log (PG_FATAL , "Could not open file \"%s\": %s\n" ,
680
680
output_path , getErrorText (errno ));
681
681
if (!db_used )
0 commit comments