pgpool2.git / summary / log / commit / refs
commit a3f6479168d27ed7dfb7ef84d32b0740c54a117e
Author: Muhammad Usama <m.usama@gmail.com>
Date: Wed Apr 29 14:13:58 2015 +0000
Passing empty string parameters in failover command when pgpool-II does not have a value for any particular parameter
Instead of omitting the values for the parameters when pgpool-II does not have
any value for a particular parameter, It now passes an empty string instead to
the failover command, This makes sure that failover script will always receive
the exact number of expected parameters.
src/main/pgpool_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c
index a4c2c5232..85add4e35 100644
--- a/src/main/pgpool_main.c
+++ b/src/main/pgpool_main.c
@@ -2399,7 +2399,7 @@ static int trigger_failover_command(int node, const char *command_line,
string_append_char(exec_cmd, newmaster->backend_hostname);
else
/* no valid new master */
- string_append_char(exec_cmd, "");
+ string_append_char(exec_cmd, "\"\"");
break;
case 'm': /* new master node id */
@@ -2416,7 +2416,7 @@ static int trigger_failover_command(int node, const char *command_line,
}
else
/* no valid new master */
- string_append_char(exec_cmd, "");
+ string_append_char(exec_cmd, "\"\"");
break;
case 'R': /* new master database directory */
@@ -2425,7 +2425,7 @@ static int trigger_failover_command(int node, const char *command_line,
string_append_char(exec_cmd, newmaster->backend_data_directory);
else
/* no valid new master */
- string_append_char(exec_cmd, "");
+ string_append_char(exec_cmd, "\"\"");
break;
case 'M': /* old master node id */
[parent: a3d76ed5a4ab]