Add two more parameters to pgxc_ctl.conf
authorPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 23 Oct 2018 05:18:39 +0000 (10:48 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 23 Oct 2018 05:18:39 +0000 (10:48 +0530)
pgxc_ctl sets up postgresql.conf and recovery.conf while adding and removing a
coordinator/datanode standby. This interfers with user defined settings if the
user has chosen different mechanism for backup/recovery, such as barman. So
this band-aid fix avoids overwriting the user defined values while
adding/removing standbys. We assume that if these parameters are set to 'y'
(the default is 'n' which means the default old behaviour), then the user would
manually setup things correctly.

doc/src/sgml/pgxc_ctl-ref.sgml
src/bin/pgxc_ctl/coord_cmd.c
src/bin/pgxc_ctl/datanode_cmd.c
src/bin/pgxc_ctl/pgxc_ctl_bash_2
src/bin/pgxc_ctl/pgxc_ctl_conf_part_empty
src/bin/pgxc_ctl/pgxc_ctl_conf_part_full
src/bin/pgxc_ctl/pgxc_ctl_conf_part_minimal
src/bin/pgxc_ctl/varnames.h

index c3b33735d5e025d2af0dd34ace098c95b4830e02..9ef3071b463c6011e8655ee4fa54450f1ef88f86 100644 (file)
@@ -1307,6 +1307,21 @@ PGXC$ prepare config minimal my_minimal_config.conf
       </listitem>
      </varlistentry>
     
+     <varlistentry>
+      <term><option>coordUserDefinedBackupSettings</option></term>
+      <listitem>
+       <para>
+        Specify whether the system should use user-defined backup/recovery
+        settings. If <literal>y</literal> is specified then
+        <application>pgxc_ctl</application> will not overwrite the
+        <literal>archive_command</literal>, <literal>restore_command</literal>,
+        <literal>max_wal_senders</literal> etc while adding or removing a coordinator
+        standby. This can be useful when users want to setup their own backup
+        and recovery mechanism.
+       </para>
+      </listitem>
+     </varlistentry>
+    
      <varlistentry>
       <term><option>coordSpecificExtraConfig</option></term>
       <listitem>
@@ -1534,6 +1549,21 @@ PGXC$ prepare config minimal my_minimal_config.conf
       </listitem>
      </varlistentry>
     
+     <varlistentry>
+      <term><option>datanodeUserDefinedBackupSettings</option></term>
+      <listitem>
+       <para>
+        Specify whether the system should use user-defined backup/recovery
+        settings. If <literal>y</literal> is specified then
+        <application>pgxc_ctl</application> will not overwrite the
+        <literal>archive_command</literal>, <literal>restore_command</literal>,
+        <literal>max_wal_senders</literal> etc while adding or removing a datanode
+        standby. This can be useful when users want to setup their own backup
+        and recovery mechanism.
+       </para>
+      </listitem>
+     </varlistentry>
+    
      <varlistentry>
       <term><option>datanodeSpecificExtraConfig</option></term>
       <listitem>
index 27d8b3a542012adf4917f48767df2ba15fc53c68..1cf86efbf9e2be9f7b69c2f042482d6e864dd06a 100644 (file)
@@ -140,13 +140,15 @@ cmd_t *prepare_initCoordinatorMaster(char *nodeName)
 
        /* Log Shipping */
 
-       if (isVarYes(VAR_coordSlave) && !is_none(aval(VAR_coordSlaveServers)[jj]))
+       if (isVarYes(VAR_coordSlave) &&
+               !isVarYes(VAR_coordUserDefinedBackupSettings) &&
+               !is_none(aval(VAR_coordSlaveServers)[jj]))
        {
                /* Build WAL archive target directory */
                appendCmdEl(cmdInitdb, (cmdWalArchDir = initCmd(aval(VAR_coordSlaveServers)[jj])));
                snprintf(newCommand(cmdWalArchDir), MAXLINE,
                                 "rm -rf %s;mkdir -p %s; chmod 0700 %s",
-                                aval(VAR_coordArchLogDirs)[jj], aval(VAR_coordArchLogDirs)[jj], 
+                                aval(VAR_coordArchLogDirs)[jj], aval(VAR_coordArchLogDirs)[jj],
                                 aval(VAR_coordArchLogDirs)[jj]);
                /* Build master's postgresql.conf */
                appendCmdEl(cmdInitdb, (cmdWalArch = initCmd(aval(VAR_coordMasterServers)[jj])));
@@ -155,7 +157,7 @@ cmd_t *prepare_initCoordinatorMaster(char *nodeName)
                        cleanCmd(cmd);
                        return(NULL);
                }
-               fprintf(f, 
+               fprintf(f,
                                "#========================================\n"
                                "# Addition for log shipping, %s\n"
                                "wal_level = replica\n"
@@ -181,7 +183,7 @@ cmd_t *prepare_initCoordinatorMaster(char *nodeName)
                cleanCmd(cmd);
                return(NULL);
        }
-       fprintf(f, 
+       fprintf(f,
                        "#=================================================\n"
                        "# Addition at initialization, %s\n",
                        timeStampString(timestamp, MAXTOKEN));
@@ -318,14 +320,19 @@ cmd_t *prepare_initCoordinatorSlave(char *nodeName)
                        "#==========================================\n"
                        "# Added to initialize the slave, %s\n"
                        "standby_mode = on\n"
-                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n"
-                       "restore_command = 'cp %s/%%f %%p'\n"
-                       "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n"
-                       "# End of addition\n",
+                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n",
                        timeStampString(timestamp, MAXTOKEN), aval(VAR_coordMasterServers)[idx], aval(VAR_coordPorts)[idx],
-                       sval(VAR_pgxcOwner), aval(VAR_coordNames)[idx], 
-                       aval(VAR_coordArchLogDirs)[idx], aval(VAR_coordArchLogDirs)[idx]);
+                       sval(VAR_pgxcOwner), aval(VAR_coordNames)[idx]);
+       if (!isVarYes(VAR_coordUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "restore_command = 'cp %s/%%f %%p'\n"
+                               "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n",
+                               aval(VAR_coordArchLogDirs)[idx], aval(VAR_coordArchLogDirs)[idx]);
+       }
+       fprintf(f, "# End of addition\n");
        fclose(f);
+
        cmdRecoveryConf->localStdin = Strdup(localStdin);
        snprintf(newCommand(cmdRecoveryConf), MAXLINE,
                         "cat >> %s/recovery.conf\n", aval(VAR_coordSlaveDirs)[idx]);
@@ -342,16 +349,21 @@ cmd_t *prepare_initCoordinatorSlave(char *nodeName)
                        "# Added to initialize the slave, %s\n"
                        "hot_standby = on\n"
                        "port = %s\n"
-                       "pooler_port = %s\n"
-                       "wal_level = replica\n"
-                       "archive_mode = off\n"
-                       "archive_command = ''\n"
-                       "max_wal_senders = 0\n"
-                       "# End of Addition\n",
+                       "pooler_port = %s\n",
                        timeStampString(timestamp, MAXTOKEN),
                        aval(VAR_coordSlavePorts)[idx],
                        aval(VAR_coordSlavePoolerPorts)[idx]);
+       if (!isVarYes(VAR_coordUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "wal_level = replica\n"
+                               "archive_mode = off\n"
+                               "archive_command = ''\n"
+                               "max_wal_senders = 0\n");
+       }
+       fprintf(f, "# End of Addition\n");
        fclose(f);
+
        cmdPgConf->localStdin = Strdup(localStdin);
        snprintf(newCommand(cmdPgConf), MAXLINE,
                         "cat >> %s/postgresql.conf", aval(VAR_coordSlaveDirs)[idx]);
@@ -1319,29 +1331,33 @@ int add_coordinatorSlave(char *name, char *host, int port, int pooler_port, char
        snprintf(port_s, MAXTOKEN, "%d", port);
        snprintf(pooler_s, MAXTOKEN, "%d", pooler_port);
        
-       /* Prepare the resources (directories) */
-       doImmediate(host, NULL, "mkdir -p %s;chmod 0700 %s", dir, dir);
-       doImmediate(host, NULL, "rm -rf %s; mkdir -p %s;chmod 0700 %s", archDir, archDir, archDir);
-       /* Reconfigure the master with WAL archive */
-       /* Update the configuration and backup the configuration file */
-       if ((f = pgxc_popen_w(aval(VAR_coordMasterServers)[idx], "cat >> %s/postgresql.conf", aval(VAR_coordMasterDirs)[idx])) == NULL)
-       {
-               elog(ERROR, "ERROR: Cannot open coordinator master's configuration file, %s/postgresql.conf, %s\n",
-                        aval(VAR_coordMasterDirs)[idx], strerror(errno));
-               return 1;
+       if (!isVarYes(VAR_coordUserDefinedBackupSettings))
+       {
+               /* Prepare the resources (directories) */
+               doImmediate(host, NULL, "mkdir -p %s;chmod 0700 %s", dir, dir);
+               doImmediate(host, NULL, "rm -rf %s; mkdir -p %s;chmod 0700 %s", archDir, archDir, archDir);
+               /* Reconfigure the master with WAL archive */
+               /* Update the configuration and backup the configuration file */
+               if ((f = pgxc_popen_w(aval(VAR_coordMasterServers)[idx], "cat >> %s/postgresql.conf", aval(VAR_coordMasterDirs)[idx])) == NULL)
+               {
+                       elog(ERROR, "ERROR: Cannot open coordinator master's configuration file, %s/postgresql.conf, %s\n",
+                                aval(VAR_coordMasterDirs)[idx], strerror(errno));
+                       return 1;
+               }
+               fprintf(f,
+                               "#========================================\n"
+                               "# Addition for log shipping, %s\n"
+                               "wal_level = replica\n"
+                               "archive_mode = on\n"
+                               "archive_command = 'rsync %%p %s@%s:%s/%%f'\n"
+                               "max_wal_senders = %d\n"
+                               "# End of Addition\n",
+                               timeStampString(date, MAXPATH),
+                               sval(VAR_pgxcUser), host, archDir,
+                               getDefaultWalSender(TRUE));
+               pclose(f);
        }
-       fprintf(f, 
-                       "#========================================\n"
-                       "# Addition for log shipping, %s\n"
-                       "wal_level = replica\n"
-                       "archive_mode = on\n"
-                       "archive_command = 'rsync %%p %s@%s:%s/%%f'\n"
-                       "max_wal_senders = %d\n"
-                       "# End of Addition\n",
-                       timeStampString(date, MAXPATH),
-                       sval(VAR_pgxcUser), host, archDir,
-                       getDefaultWalSender(TRUE));
-       pclose(f);
+
        /* pg_hba.conf for replication */
        if ((f = pgxc_popen_w(aval(VAR_coordMasterServers)[idx], "cat >> %s/pg_hba.conf", aval(VAR_coordMasterDirs)[idx])) == NULL)
        {
@@ -1436,15 +1452,21 @@ int add_coordinatorSlave(char *name, char *host, int port, int pooler_port, char
                        "# Added to initialize the slave, %s\n"
                        "hot_standby = on\n"
                        "port = %d\n"
-                       "pooler_port = %d\n"
-                       "wal_level = replica\n"
-                       "archive_mode = off\n"          /* No archive mode */
-                       "archive_command = ''\n"        /* No archive mode */
-                       "max_wal_senders = 0\n"         /* Minimum WAL senders */
-                       "# End of Addition\n",
+                       "pooler_port = %d\n",
                        timeStampString(date, MAXTOKEN),
                        atoi(aval(VAR_coordSlavePorts)[idx]),
                        atoi(aval(VAR_coordSlavePoolerPorts)[idx]));
+
+       if (!isVarYes(VAR_coordUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "wal_level = replica\n"
+                               "archive_mode = off\n"          /* No archive mode */
+                               "archive_command = ''\n"        /* No archive mode */
+                               "max_wal_senders = 0\n");       /* Minimum WAL senders */
+       }
+
+       fprintf(f, "# End of Addition\n");
        pclose(f);
        /* Update the slave recovery.conf */
        if ((f = pgxc_popen_w(host, "cat >> %s/recovery.conf", dir)) == NULL)
@@ -1456,13 +1478,18 @@ int add_coordinatorSlave(char *name, char *host, int port, int pooler_port, char
                        "#==========================================\n"
                        "# Added to add the slave, %s\n"
                        "standby_mode = on\n"
-                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n"
-                       "restore_command = 'cp %s/%%f %%p'\n"
-                       "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n"
-                       "# End of addition\n",
+                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n",
                        timeStampString(date, MAXTOKEN), aval(VAR_coordMasterServers)[idx], aval(VAR_coordPorts)[idx],
-                       sval(VAR_pgxcOwner), aval(VAR_coordNames)[idx], 
-                       aval(VAR_coordArchLogDirs)[idx], aval(VAR_coordArchLogDirs)[idx]);
+                       sval(VAR_pgxcOwner), aval(VAR_coordNames)[idx]);
+
+       if (!isVarYes(VAR_coordUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "restore_command = 'cp %s/%%f %%p'\n"
+                               "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n",
+                               aval(VAR_coordArchLogDirs)[idx], aval(VAR_coordArchLogDirs)[idx]);
+       }
+       fprintf(f, "# End of addition\n");
        pclose(f);
 
        /* Start the slave */
@@ -1681,13 +1708,19 @@ int remove_coordinatorSlave(char *name, int clean_opt)
                fprintf(f,
                                "#=======================================\n"
                                "# Updated to remove the slave %s\n"
-                               "archive_mode = off\n"
-                               "synchronous_standby_names = ''\n"
-                               "archive_command = ''\n"
-                               "max_wal_senders = 0\n"
-                               "wal_level = minimal\n"
-                               "# End of the update\n",
+                               "synchronous_standby_names = ''\n",
                                timeStampString(date, MAXTOKEN));
+
+               if (!isVarYes(VAR_coordUserDefinedBackupSettings))
+               {
+                       fprintf(f,
+                                       "wal_level = minimal\n"
+                                       "archive_mode = off\n"
+                                       "archive_command = ''\n"
+                                       "max_wal_senders = 0\n");
+               }
+
+               fprintf(f, "# End of the update\n");
                pclose(f);
        }
        doImmediate(aval(VAR_coordMasterServers)[idx], NULL, "pg_ctl restart -Z coordinator -D %s", aval(VAR_coordMasterDirs)[idx]);
index 94febf80a22594b98ad561f58553a803b943fb29..5a4fc47d5bea822f4f9f51af3b7bc9fca74e5135 100644 (file)
@@ -156,7 +156,9 @@ cmd_t *prepare_initDatanodeMaster(char *nodeName)
        fclose(f);
        
        /* Additional Initialization for log_shipping */
-       if (isVarYes(VAR_datanodeSlave) && !is_none(aval(VAR_datanodeSlaveServers)[idx]))
+       if (isVarYes(VAR_datanodeSlave) &&
+               !isVarYes(VAR_datanodeUserDefinedBackupSettings) &&
+               !is_none(aval(VAR_datanodeSlaveServers)[idx]))
        {
                cmd_t *cmd_cleanDir, *cmd_PgConf;
                /* This datanode has a slave */
@@ -345,14 +347,19 @@ cmd_t *prepare_initDatanodeSlave(char *nodeName)
                        "#==========================================\n"
                        "# Added to initialize the slave, %s\n"
                        "standby_mode = on\n"
-                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n"
-                       "restore_command = 'cp %s/%%f %%p'\n"
-                       "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n",               
+                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n",
                        timeStampString(timestamp, MAXTOKEN),
-                       aval(VAR_datanodeMasterServers)[idx], aval(VAR_datanodePorts)[idx], 
-                       sval(VAR_pgxcOwner), aval(VAR_datanodeNames)[idx],
-                       aval(VAR_datanodeArchLogDirs)[idx],
-                       aval(VAR_datanodeArchLogDirs)[idx]);
+                       aval(VAR_datanodeMasterServers)[idx], aval(VAR_datanodePorts)[idx],
+                       sval(VAR_pgxcOwner), aval(VAR_datanodeNames)[idx]);
+
+       if (!isVarYes(VAR_datanodeUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "restore_command = 'cp %s/%%f %%p'\n"
+                               "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n",
+                               aval(VAR_datanodeArchLogDirs)[idx],
+                               aval(VAR_datanodeArchLogDirs)[idx]);
+       }
        fclose(f);
 
        /* Configure slave's postgresql.conf */
@@ -1399,17 +1406,21 @@ int add_datanodeSlave(char *name, char *host, int port, int pooler, char *dir,
        fprintf(f, 
                        "#========================================\n"
                        "# Addition for log shipping, %s\n"
-                       "wal_level = replica\n"
-                       "archive_mode = on\n"
-                       "archive_command = 'rsync %%p %s@%s:%s/%%f'\n"
-                       "max_wal_senders = %d\n"
                        "synchronous_commit = on\n"
-                       "synchronous_standby_names = '%s'\n"
-                       "# End of Addition\n",
-                       timeStampString(date, MAXPATH),
-                       sval(VAR_pgxcUser), host, archDir,
-                       getDefaultWalSender(FALSE),
-                       name);
+                       "synchronous_standby_names = '%s'\n",
+                       timeStampString(date, MAXPATH), name);
+
+       if (!isVarYes(VAR_datanodeUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "wal_level = replica\n"
+                               "archive_mode = on\n"
+                               "archive_command = 'rsync %%p %s@%s:%s/%%f'\n"
+                               "max_wal_senders = %d\n",
+                               sval(VAR_pgxcUser), host, archDir,
+                               getDefaultWalSender(FALSE));
+       }
+       fprintf(f, "# End of Addition\n");
        pclose(f);
        /* pg_hba.conf for replication */
        if ((f = pgxc_popen_w(aval(VAR_datanodeMasterServers)[idx], "cat >> %s/pg_hba.conf", aval(VAR_datanodeMasterDirs)[idx])) == NULL)
@@ -1516,13 +1527,17 @@ int add_datanodeSlave(char *name, char *host, int port, int pooler, char *dir,
                        "# Added to initialize the slave, %s\n"
                        "hot_standby = on\n"
                        "port = %s\n"
-                       "pooler_port = %s\n"
-                       "wal_level = replica\n"
-                       "archive_mode = off\n"          /* No archive mode */
-                       "archive_command = ''\n"        /* No archive mode */
-                       "max_wal_senders = 0\n"         /* Minimum WAL senders */
-                       "# End of Addition\n",
+                       "pooler_port = %s\n",
                        timeStampString(date, MAXTOKEN), aval(VAR_datanodeSlavePorts)[idx], aval(VAR_datanodeSlavePoolerPorts)[idx]);
+       if (!isVarYes(VAR_datanodeUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "wal_level = replica\n"
+                               "archive_mode = off\n"          /* No archive mode */
+                               "archive_command = ''\n"        /* No archive mode */
+                               "max_wal_senders = 0\n");       /* Minimum WAL senders */
+       }
+       fprintf(f, "# End of Addition\n");
        pclose(f);
        /* Update the slave recovery.conf */
        if ((f = pgxc_popen_w(host, "cat >> %s/recovery.conf", dir)) == NULL)
@@ -1534,13 +1549,17 @@ int add_datanodeSlave(char *name, char *host, int port, int pooler, char *dir,
                        "#==========================================\n"
                        "# Added to add the slave, %s\n"
                        "standby_mode = on\n"
-                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n"
-                       "restore_command = 'cp %s/%%f %%p'\n"
-                       "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n"
-                       "# End of addition\n",
+                       "primary_conninfo = 'host = %s port = %s user = %s application_name = %s'\n",
                        timeStampString(date, MAXTOKEN), aval(VAR_datanodeMasterServers)[idx], aval(VAR_datanodePorts)[idx],
-                       sval(VAR_pgxcOwner), aval(VAR_datanodeNames)[idx], 
-                       aval(VAR_datanodeArchLogDirs)[idx], aval(VAR_datanodeArchLogDirs)[idx]);
+                       sval(VAR_pgxcOwner), aval(VAR_datanodeNames)[idx]);
+       if (!isVarYes(VAR_datanodeUserDefinedBackupSettings))
+       {
+               fprintf(f,
+                               "restore_command = 'cp %s/%%f %%p'\n"
+                               "archive_cleanup_command = 'pg_archivecleanup %s %%r'\n",
+                               aval(VAR_datanodeArchLogDirs)[idx], aval(VAR_datanodeArchLogDirs)[idx]);
+       }
+       fprintf(f, "# End of addition\n");
        pclose(f);
        /* Start the slave */
        doImmediate(host, NULL, "pg_ctl start -w -Z datanode -D %s", dir);
@@ -1782,13 +1801,19 @@ int remove_datanodeSlave(char *name, int clean_opt)
                fprintf(f,
                                "#=======================================\n"
                                "# Updated to remove the slave %s\n"
-                               "archive_mode = off\n"
-                               "synchronous_standby_names = ''\n"
-                               "archive_command = ''\n"
-                               "max_wal_senders = 0\n"
-                               "wal_level = minimal\n"
-                               "# End of the update\n",
+                               "synchronous_standby_names = ''\n",
                                timeStampString(date, MAXTOKEN));
+
+               if (!isVarYes(VAR_datanodeUserDefinedBackupSettings))
+               {
+                       fprintf(f,
+                                       "wal_level = minimal\n"
+                                       "archive_mode = off\n"
+                                       "archive_command = ''\n"
+                                       "max_wal_senders = 0\n");
+               }
+
+               fprintf(f, "# End of the update\n");
                pclose(f);
        }
        doImmediate(aval(VAR_datanodeMasterServers)[idx], NULL, "pg_ctl restart -Z datanode -D %s", aval(VAR_datanodeMasterDirs)[idx]);
index 843fa7b25cfb4bebe34ce6f979bf0163430efa0b..f1c9f04917d561050ed688de4f81727eafa03a72 100755 (executable)
@@ -78,6 +78,7 @@ function print_values
        print_array coordMasterServers
        print_array coordMasterDirs
        print_array coordMaxWALSenders
+       echo coordUserDefinedBackupSettings $coordUserDefinedBackupSettings
 
        # Coordinators slave
        echo coordSlave $coordSlave
@@ -116,6 +117,7 @@ function print_values
        print_array datanodePoolerPorts
 #endif
        print_array datanodePgHbaEntries
+       echo datanodeUserDefinedBackupSettings $datanodeUserDefinedBackupSettings
        
        # Datanodes masters
        print_array datanodeMasterServers
index 4cce952c223258e31f9a21d410fd4c58e9ab3860..185ccb9fdf9225be648d4d2713d28c0c858f92d4 100644 (file)
@@ -167,6 +167,10 @@ coordSlave=n                       # Specify y if you configure at least one coordiantor slave.  Oth
                                                # then coordSlave value will be set to n and all the following values will be set to
                                                # empty values.
 coordSlaveSync=n               # Specify to connect with synchronized mode.
+
+coordUserDefinedBackupSettings=n       # Specify whether to update backup/recovery
+                                                                       # settings during standby addition/removal.
+
 coordSlaveServers=()                   # none means this slave is not available
 coordSlavePorts=()                     # coordinator slave listening ports
 coordSlavePoolerPorts=()                       # coordinator slave pooler ports
@@ -238,6 +242,10 @@ datanodeSlave=n                    # Specify y if you configure at least one coordiantor slave.
                                                # If no effective server names are found (that is, every servers are specified as none),
                                                # then datanodeSlave value will be set to n and all the following values will be set to
                                                # empty values.
+
+datanodeUserDefinedBackupSettings=n    # Specify whether to update backup/recovery
+                                                                       # settings during standby addition/removal.
+                                                                       #
 datanodeSlaveServers=()        # value none means this slave is not available
 datanodeSlavePorts=()  # Master and slave use the same port!
 datanodeSlavePoolerPorts=()    # Master and slave use the same port!
index a97e6b296cfd2419f0b41a3fdd5f5330eab6dda3..12f13723eef12ad79d2cf943320698af3c90205d 100755 (executable)
@@ -167,6 +167,10 @@ coordSlave=y                       # Specify y if you configure at least one coordiantor slave.  Oth
                                                # If no effective server names are found (that is, every servers are specified as none),
                                                # then coordSlave value will be set to n and all the following values will be set to
                                                # empty values.
+
+coordUserDefinedBackupSettings=n       # Specify whether to update backup/recovery
+                                                                       # settings during standby addition/removal.
+
 coordSlaveSync=y               # Specify to connect with synchronized mode.
 coordSlaveServers=(node07 node08 node09 node06)                        # none means this slave is not available
 coordSlavePorts=(20004 20005 20004 20005)                      # Master ports
@@ -266,6 +270,10 @@ datanodeSlave=y                    # Specify y if you configure at least one coordiantor slave.
                                                # If no effective server names are found (that is, every servers are specified as none),
                                                # then datanodeSlave value will be set to n and all the following values will be set to
                                                # empty values.
+
+datanodeUserDefinedBackupSettings=n    # Specify whether to update backup/recovery
+                                                                       # settings during standby addition/removal.
+
 datanodeSlaveServers=(node07 node08 node09 node06)     # value none means this slave is not available
 datanodeSlavePorts=(20008 20009 20008 20009)   # value none means this slave is not available
 datanodeSlavePoolerPorts=(20012 20013 20012 20013)     # value none means this slave is not available
index cfd7d28d6417cdcdaa4b7684a8402358597da075..ee46c9532a3409de26f6ab15eebb5aa0932999f9 100644 (file)
@@ -167,6 +167,10 @@ coordSlave=n                       # Specify y if you configure at least one coordiantor slave.  Oth
                                                # then coordSlave value will be set to n and all the following values will be set to
                                                # empty values.
 coordSlaveSync=y               # Specify to connect with synchronized mode.
+
+#coordUserDefinedBackupSettings=n      # Specify whether to update backup/recovery
+#                                                                      # settings during standby addition/removal.
+
 coordSlaveServers=(localhost localhost)                        # none means this slave is not available
 coordSlavePorts=(30101 30102)                  # coordinator slave listening ports
 coordSlavePoolerPorts=(30111 30112)                    # coordinator slave pooler ports
@@ -240,6 +244,10 @@ datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender)
                                                # If no effective server names are found (that is, every servers are specified as none),
                                                # then datanodeSlave value will be set to n and all the following values will be set to
                                                # empty values.
+#
+#datanodeUserDefinedBackupSettings=n   # Specify whether to update backup/recovery
+#                                                                      # settings during standby addition/removal.
+
 #datanodeSlaveServers=(localhost localhost)    # value none means this slave is not available
 #datanodeSlavePorts=(40101 40102)      # Master and slave use the same port!
 #datanodeSlavePoolerPorts=(40111 40112)        # Master and slave use the same port!
index f3e65a4420fb3127a6d79ef41028459b7ad9c72d..11bb23f712b47a85ccbdbf8ff26e536820bfdf06 100644 (file)
@@ -60,6 +60,7 @@
 #define VAR_coordPorts         "coordPorts"
 #define VAR_poolerPorts                "poolerPorts"
 #define VAR_coordPgHbaEntries  "coordPgHbaEntries"
+#define VAR_coordUserDefinedBackupSettings             "coordUserDefinedBackupSettings"
 
 /* Coordinators master */
 #define VAR_coordMasterServers "coordMasterServers"
@@ -94,6 +95,7 @@
 #define VAR_datanodePoolerPorts                "datanodePoolerPorts"
 #define VAR_datanodePgHbaEntries       "datanodePgHbaEntries"
 #define VAR_primaryDatanode                    "primaryDatanode"
+#define VAR_datanodeUserDefinedBackupSettings          "datanodeUserDefinedBackupSettings"
 
 /* Datanode masters */
 #define VAR_datanodeMasterServers      "datanodeMasterServers"