summaryrefslogtreecommitdiff
path: root/src/bin/initdb
diff options
context:
space:
mode:
authorPavan Deolasee2016-04-12 11:03:51 +0000
committerPavan Deolasee2016-10-18 10:05:05 +0000
commitcb677f9f7594df50837295774aad4e8d24ece163 (patch)
treeaa5297113306c4af13d3f65375b4cf94d3e3a747 /src/bin/initdb
parentb682953a137a167b4f7e5835961bfcd0b2ef0457 (diff)
Suppress the message hinting to start coordinator/datanode/gtm server at the
end of initdb/initgtm when the commands are run via pgxc_ctl This can be confusing to the user. We use an environment varibale PGXC_CTL_SILENT to silence the message instead of adding a new option.
Diffstat (limited to 'src/bin/initdb')
-rw-r--r--src/bin/initdb/initdb.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 69c75611d6..2ab3cb5386 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -3784,22 +3784,29 @@ main(int argc, char *argv[])
#ifdef PGXC
- printf(_("\nSuccess.\n You can now start the database server of the Postgres-XL coordinator using:\n\n"
- " %s%s%spostgres%s --coordinator -D %s%s%s\n"
- "or\n"
- " %s%s%spg_ctl%s start -D %s%s%s -Z coordinator -l logfile\n\n"
- " You can now start the database server of the Postgres-XL datanode using:\n\n"
- " %s%s%spostgres%s --datanode -D %s%s%s\n"
- "or \n"
- " %s%s%spg_ctl%s start -D %s%s%s -Z datanode -l logfile\n\n"),
- QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
- QUOTE_PATH, pgdata_native, QUOTE_PATH,
- QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
- QUOTE_PATH, pgdata_native, QUOTE_PATH,
- QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
- QUOTE_PATH, pgdata_native, QUOTE_PATH,
- QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
- QUOTE_PATH, pgdata_native, QUOTE_PATH);
+ printf(_("\nSuccess.\n"));
+ {
+ char *pgxc_ctl_silent = getenv("PGXC_CTL_SILENT");
+ if (!pgxc_ctl_silent || !strlen(pgxc_ctl_silent))
+ {
+ printf(_("You can now start the database server of the Postgres-XL coordinator using:\n\n"
+ " %s%s%spostgres%s --coordinator -D %s%s%s\n"
+ "or\n"
+ " %s%s%spg_ctl%s start -D %s%s%s -Z coordinator -l logfile\n\n"
+ " You can now start the database server of the Postgres-XL datanode using:\n\n"
+ " %s%s%spostgres%s --datanode -D %s%s%s\n"
+ "or \n"
+ " %s%s%spg_ctl%s start -D %s%s%s -Z datanode -l logfile\n\n"),
+ QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
+ QUOTE_PATH, pgdata_native, QUOTE_PATH,
+ QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
+ QUOTE_PATH, pgdata_native, QUOTE_PATH,
+ QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
+ QUOTE_PATH, pgdata_native, QUOTE_PATH,
+ QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
+ QUOTE_PATH, pgdata_native, QUOTE_PATH);
+ }
+ }
#else
printf(_("\nSuccess. You can now start the database server using:\n\n"
" %s%s%spg_ctl%s -D %s%s%s -l logfile start\n\n"),