@ -139,6 +139,7 @@ static const char *authmethodhost = NULL;
static const char * authmethodlocal = NULL ;
static const char * authmethodlocal = NULL ;
static bool debug = false ;
static bool debug = false ;
static bool noclean = false ;
static bool noclean = false ;
static bool noinstructions = false ;
static bool do_sync = true ;
static bool do_sync = true ;
static bool sync_only = false ;
static bool sync_only = false ;
static bool show_setting = false ;
static bool show_setting = false ;
@ -2294,6 +2295,7 @@ usage(const char *progname)
printf ( _ ( " -L DIRECTORY where to find the input files \n " ) ) ;
printf ( _ ( " -L DIRECTORY where to find the input files \n " ) ) ;
printf ( _ ( " -n, --no-clean do not clean up after errors \n " ) ) ;
printf ( _ ( " -n, --no-clean do not clean up after errors \n " ) ) ;
printf ( _ ( " -N, --no-sync do not wait for changes to be written safely to disk \n " ) ) ;
printf ( _ ( " -N, --no-sync do not wait for changes to be written safely to disk \n " ) ) ;
printf ( _ ( " --no-instructions do not print instructions for next steps \n " ) ) ;
printf ( _ ( " -s, --show show internal settings \n " ) ) ;
printf ( _ ( " -s, --show show internal settings \n " ) ) ;
printf ( _ ( " -S, --sync-only only sync data directory \n " ) ) ;
printf ( _ ( " -S, --sync-only only sync data directory \n " ) ) ;
printf ( _ ( " \n Other options: \n " ) ) ;
printf ( _ ( " \n Other options: \n " ) ) ;
@ -2955,6 +2957,7 @@ main(int argc, char *argv[])
{ " no-clean " , no_argument , NULL , ' n ' } ,
{ " no-clean " , no_argument , NULL , ' n ' } ,
{ " nosync " , no_argument , NULL , ' N ' } , /* for backwards compatibility */
{ " nosync " , no_argument , NULL , ' N ' } , /* for backwards compatibility */
{ " no-sync " , no_argument , NULL , ' N ' } ,
{ " no-sync " , no_argument , NULL , ' N ' } ,
{ " no-instructions " , no_argument , NULL , 13 } ,
{ " sync-only " , no_argument , NULL , ' S ' } ,
{ " sync-only " , no_argument , NULL , ' S ' } ,
{ " waldir " , required_argument , NULL , ' X ' } ,
{ " waldir " , required_argument , NULL , ' X ' } ,
{ " wal-segsize " , required_argument , NULL , 12 } ,
{ " wal-segsize " , required_argument , NULL , 12 } ,
@ -3095,6 +3098,9 @@ main(int argc, char *argv[])
case 12 :
case 12 :
str_wal_segment_size_mb = pg_strdup ( optarg ) ;
str_wal_segment_size_mb = pg_strdup ( optarg ) ;
break ;
break ;
case 13 :
noinstructions = true ;
break ;
case ' g ' :
case ' g ' :
SetDataDirectoryCreatePerm ( PG_DIR_MODE_GROUP ) ;
SetDataDirectoryCreatePerm ( PG_DIR_MODE_GROUP ) ;
break ;
break ;
@ -3245,6 +3251,8 @@ main(int argc, char *argv[])
" --auth-local and --auth-host, the next time you run initdb. \n " ) ) ;
" --auth-local and --auth-host, the next time you run initdb. \n " ) ) ;
}
}
if ( ! noinstructions )
{
/*
/*
* Build up a shell command to tell the user how to start the server
* Build up a shell command to tell the user how to start the server
*/
*/
@ -3274,6 +3282,10 @@ main(int argc, char *argv[])
destroyPQExpBuffer ( start_db_cmd ) ;
destroyPQExpBuffer ( start_db_cmd ) ;
printf ( _ ( " \n Success. \n " ) ) ;
}
success = true ;
success = true ;
return 0 ;
return 0 ;
}
}