@@ -147,10 +147,9 @@ report_clusters_compatible(void)
147147}
148148
149149pg_log (PG_REPORT ,"\n"
150- "| If pg_upgrade fails after this point, you must\n"
151- "| re-initdb the new cluster before continuing.\n"
152- "| You will also need to remove the \".old\" suffix\n"
153- "| from %s/global/pg_control.old.\n" ,old_cluster .pgdata );
150+ "If pg_upgrade fails after this point, you must re-initdb the new cluster\n"
151+ "before continuing. You will also need to remove the \".old\" suffix from\n"
152+ "%s/global/pg_control.old.\n" ,old_cluster .pgdata );
154153}
155154
156155
@@ -198,21 +197,20 @@ output_completion_banner(char *deletion_script_file_name)
198197/* Did we copy the free space files? */
199198if (GET_MAJOR_VERSION (old_cluster .major_version ) >=804 )
200199pg_log (PG_REPORT ,
201- "| Optimizer statistics are not transferred by pg_upgrade\n"
202- "| so consider running:\n"
203- "| \tvacuumdb --all --analyze-only\n"
204- "| on the newly-upgraded cluster.\n\n" );
200+ "Optimizer statistics are not transferred by pg_upgrade so consider \n"
201+ "running:\n"
202+ " vacuumdb --all --analyze-only\n"
203+ "on the newly-upgraded cluster.\n\n" );
205204else
206205pg_log (PG_REPORT ,
207- "| Optimizer statistics and free space information\n"
208- "| are not transferred by pg_upgrade so consider\n"
209- "| running:\n"
210- "| \tvacuumdb --all --analyze\n"
211- "| on the newly-upgraded cluster.\n\n" );
206+ "Optimizer statistics and free space information are not transferred\n"
207+ "by pg_upgrade so consider running:\n"
208+ " vacuumdb --all --analyze\n"
209+ "on the newly-upgraded cluster.\n\n" );
212210
213211pg_log (PG_REPORT ,
214- "| Running this script will delete the old cluster's data files:\n"
215- "| \t %s\n" ,
212+ "Running this script will delete the old cluster's data files:\n"
213+ " %s\n" ,
216214deletion_script_file_name );
217215}
218216
@@ -427,8 +425,8 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
427425os_info .cwd ,SCRIPT_EXT );
428426
429427if ((script = fopen (* deletion_script_file_name ,"w" ))== NULL )
430- pg_log (PG_FATAL ,"Could notcreate necessary file: %s\n" ,
431- * deletion_script_file_name );
428+ pg_log (PG_FATAL ,"Could notopen file \"%s\": %s\n" ,
429+ * deletion_script_file_name , getErrorText ( errno ) );
432430
433431#ifndef WIN32
434432/* add shebang header */
@@ -477,8 +475,8 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
477475
478476#ifndef WIN32
479477if (chmod (* deletion_script_file_name ,S_IRWXU )!= 0 )
480- pg_log (PG_FATAL ,"Could not add execute permission to file: %s\n" ,
481- * deletion_script_file_name );
478+ pg_log (PG_FATAL ,"Could not add execute permission to file \"%s\": %s\n" ,
479+ * deletion_script_file_name , getErrorText ( errno ) );
482480#endif
483481
484482check_ok ();
@@ -600,10 +598,11 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
600598{
601599found = true;
602600if (script == NULL && (script = fopen (output_path ,"w" ))== NULL )
603- pg_log (PG_FATAL ,"Could not create necessary file: %s\n" ,output_path );
601+ pg_log (PG_FATAL ,"Could not open file \"%s\": %s\n" ,
602+ output_path ,getErrorText (errno ));
604603if (!db_used )
605604{
606- fprintf (script ,"Database: %s\n" ,active_db -> db_name );
605+ fprintf (script ,"Database: %s\n" ,active_db -> db_name );
607606db_used = true;
608607}
609608fprintf (script ," %s.%s\n" ,
@@ -623,15 +622,13 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
623622{
624623pg_log (PG_REPORT ,"fatal\n" );
625624pg_log (PG_FATAL ,
626- "| Your installation contains \"contrib/isn\" functions\n"
627- "| which rely on the bigint data type. Your old and\n"
628- "| new clusters pass bigint values differently so this\n"
629- "| cluster cannot currently be upgraded. You can\n"
630- "| manually upgrade data that use \"contrib/isn\"\n"
631- "| facilities and remove \"contrib/isn\" from the\n"
632- "| old cluster and restart the upgrade. A list\n"
633- "| of the problem functions is in the file:\n"
634- "| \t%s\n\n" ,output_path );
625+ "Your installation contains \"contrib/isn\" functions which rely on the\n"
626+ "bigint data type. Your old and new clusters pass bigint values\n"
627+ "differently so this cluster cannot currently be upgraded. You can\n"
628+ "manually upgrade databases that use \"contrib/isn\" facilities and remove\n"
629+ "\"contrib/isn\" from the old cluster and restart the upgrade. A list of\n"
630+ "the problem functions is in the file:\n"
631+ " %s\n\n" ,output_path );
635632}
636633else
637634check_ok ();
@@ -657,7 +654,7 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
657654bool found = false;
658655char output_path [MAXPGPATH ];
659656
660- prep_status ("Checking for reg* systemoid user data types" );
657+ prep_status ("Checking for reg* systemOID user data types" );
661658
662659snprintf (output_path ,sizeof (output_path ),"%s/tables_using_reg.txt" ,
663660os_info .cwd );
@@ -702,10 +699,11 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
702699{
703700found = true;
704701if (script == NULL && (script = fopen (output_path ,"w" ))== NULL )
705- pg_log (PG_FATAL ,"Could not create necessary file: %s\n" ,output_path );
702+ pg_log (PG_FATAL ,"Could not open file \"%s\": %s\n" ,
703+ output_path ,getErrorText (errno ));
706704if (!db_used )
707705{
708- fprintf (script ,"Database: %s\n" ,active_db -> db_name );
706+ fprintf (script ,"Database: %s\n" ,active_db -> db_name );
709707db_used = true;
710708}
711709fprintf (script ," %s.%s.%s\n" ,
@@ -726,13 +724,12 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
726724{
727725pg_log (PG_REPORT ,"fatal\n" );
728726pg_log (PG_FATAL ,
729- "| Your installation contains one of the reg* data types in\n"
730- "| user tables. These data types reference system oids that\n"
731- "| are not preserved by pg_upgrade, so this cluster cannot\n"
732- "| currently be upgraded. You can remove the problem tables\n"
733- "| and restart the upgrade. A list of the problem columns\n"
734- "| is in the file:\n"
735- "| \t%s\n\n" ,output_path );
727+ "Your installation contains one of the reg* data types in user tables.\n"
728+ "These data types reference system OIDs that are not preserved by\n"
729+ "pg_upgrade, so this cluster cannot currently be upgraded. You can\n"
730+ "remove the problem tables and restart the upgrade. A list of the problem\n"
731+ "columns is in the file:\n"
732+ " %s\n\n" ,output_path );
736733}
737734else
738735check_ok ();