File tree 1 file changed +14
-12
lines changed 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -458,30 +458,32 @@ main(int argc, char *argv[])
458
458
if (minXlogSegNo > newXlogSegNo )
459
459
newXlogSegNo = minXlogSegNo ;
460
460
461
+ if (noupdate )
462
+ {
463
+ PrintNewControlValues ();
464
+ exit (0 );
465
+ }
466
+
461
467
/*
462
468
* If we had to guess anything, and -f was not given, just print the
463
- * guessed values and exit. Also print if -n is given.
469
+ * guessed values and exit.
464
470
*/
465
- if (( guessed && !force ) || noupdate )
471
+ if (guessed && !force )
466
472
{
467
473
PrintNewControlValues ();
468
- if (!noupdate )
469
- {
470
- printf (_ ("\nIf these values seem acceptable, use -f to force reset.\n" ));
471
- exit (1 );
472
- }
473
- else
474
- exit (0 );
474
+ pg_log_error ("not proceeding because control file values were guessed" );
475
+ pg_log_error_hint ("If these values seem acceptable, use -f to force reset." );
476
+ exit (1 );
475
477
}
476
478
477
479
/*
478
480
* Don't reset from a dirty pg_control without -f, either.
479
481
*/
480
482
if (ControlFile .state != DB_SHUTDOWNED && !force )
481
483
{
482
- printf ( _ ( "The database server was not shut down cleanly.\n"
483
- "Resetting the write-ahead log might cause data to be lost.\n"
484
- "If you want to proceed anyway, use -f to force reset.\n" ) );
484
+ pg_log_error ( " database server was not shut down cleanly" );
485
+ pg_log_error_detail ( "Resetting the write-ahead log might cause data to be lost." );
486
+ pg_log_error_hint ( "If you want to proceed anyway, use -f to force reset." );
485
487
exit (1 );
486
488
}
487
489
You can’t perform that action at this time.
0 commit comments