From 69d9d137e0cf4d1db11f44aa1ced9546ccdee468 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 1 Jul 2016 08:47:20 +0900 Subject: [PATCH] repmgr: change default pg_ctl shutdown mode to "fast" This matches the default pg_ctl behaviour (from 9.5) and is the more sensible option for performing time-critical operations such as switchover. --- repmgr.c | 2 +- repmgr.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repmgr.c b/repmgr.c index 51c1cac6..6c9761ac 100644 --- a/repmgr.c +++ b/repmgr.c @@ -4220,7 +4220,7 @@ do_help(void) printf(_(" -w, --wal-keep-segments=VALUE (standby clone) minimum value for the GUC\n" \ " wal_keep_segments (default: %s)\n"), DEFAULT_WAL_KEEP_SEGMENTS); printf(_(" -W, --wait (standby follow) wait for a master to appear\n")); - printf(_(" -m, --mode (standby switchover) shutdown mode (smart|fast|immediate)\n")); + printf(_(" -m, --mode (standby switchover) shutdown mode (\"fast\" - default, \"smart\" or \"immediate\")\n")); printf(_(" -C, --remote-config-file (standby switchover) path to the configuration file on\n" \ " the current master\n")); printf(_(" -B, --remote-pg_bindir (standby switchover) path to PostgreSQL binaries on\n" \ diff --git a/repmgr.h b/repmgr.h index 4ce9c6bd..bb37fbb9 100644 --- a/repmgr.h +++ b/repmgr.h @@ -71,7 +71,6 @@ typedef struct bool fast_checkpoint; bool ignore_external_config_files; bool csv_mode; - char pg_ctl_mode[MAXLEN]; char masterport[MAXLEN]; /* * configuration file parameters which can be overridden on the @@ -83,6 +82,7 @@ typedef struct char remote_config_file[MAXLEN]; char remote_pg_bindir[MAXLEN]; char pg_rewind[MAXPGPATH]; + char pg_ctl_mode[MAXLEN]; /* parameter used by STANDBY {ARCHIVE_CONFIG | RESTORE_CONFIG} */ char config_archive_dir[MAXLEN]; /* parameter used by CLUSTER CLEANUP */ @@ -97,7 +97,7 @@ typedef struct bool initdb_no_pwprompt; } t_runtime_options; -#define T_RUNTIME_OPTIONS_INITIALIZER { "", "", "", "", "", "", "", DEFAULT_WAL_KEEP_SEGMENTS, false, false, false, false, false, false, false, false, false, false, "smart", "", "", "", "", "", "", 0, "", "", "", false } +#define T_RUNTIME_OPTIONS_INITIALIZER { "", "", "", "", "", "", "", DEFAULT_WAL_KEEP_SEGMENTS, false, false, false, false, false, false, false, false, false, false, "", "", "", "", "", "fast", "", 0, "", "", "", false } struct BackupLabel {