Change the default value of search_primary_node_timeout from 10 to 300.
authorTatsuo Ishii <ishii@postgresql.org>
Sat, 24 Sep 2016 01:42:12 +0000 (10:42 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sat, 24 Sep 2016 01:42:12 +0000 (10:42 +0900)
Prior default value 10 seconds is sometimes too short for a standby to
be promoted.

Per [pgpool-general: 5026].

doc/pgpool-en.html
doc/pgpool-ja.html
src/config/pool_config_variables.c
src/parser/scan.c
src/sample/pgpool.conf.sample
src/sample/pgpool.conf.sample-master-slave
src/sample/pgpool.conf.sample-replication
src/sample/pgpool.conf.sample-stream

index be57cec5a00fe6c27405d8b0b6fa4fdbf04523dd..a5cdc8beb412c543f8b5ab8d14e7839d2a9d420a 100644 (file)
@@ -1075,7 +1075,7 @@ local0.*    /var/log/pgpool.log
     <dd>
     <p>The parameter specifies the maximum amount of time in seconds to search
     for a primary node when a failover scenario occurs.
-    The default value for the parameter is 10.
+    The default value for the parameter is 300.
     pgpool-II will search for the primary node for the amount of time given in case of
     failover before giving up trying to search for a primary node.
     0 means keep trying forever.
index 69e047551e82dead9a6db5d8326358d982e8bb1d..d509cb10851d128ddbb9c9d4c85d2791380e2fa5 100644 (file)
@@ -1125,7 +1125,7 @@ local0.*    /var/log/pgpool.log
     <dt><a name="SEARCH_PRIMARY_NODE_TIMEOUT"></a>search_primary_node_timeout <span class="version">V3.3 -</span></dt>
     <dd>
     <p>このパラメータはフェイルオーバが起きた時にプライマリノードを検索する際のタイムアウト時間を秒単位で指定します。
-        デフォルト値は10です。
+        デフォルト値は300です。
         pgpool-IIは、フェイルオーバの際にここで指定した時間プライマリノードを検索し続けます。
         0を指定すると、永久に検索し続けます。
         このパラメータはストリーミングレプリケーションモードで運用している場合以外は無視されます。
index 4dcdb7595707ba936a6abb98646f9121f0053cb0..e689321816e17915f910fd04bc414c044f631564 100644 (file)
@@ -1417,7 +1417,7 @@ static struct config_int ConfigureNamesInt[] =
                        CONFIG_VAR_TYPE_INT,false, 0
                },
                &g_pool_config.search_primary_node_timeout,
-               10,
+               300,
                0,INT_MAX,
                NULL, NULL, NULL
        },
index fa356dcd1d29dbfb9af4d812e80ae27ca4971fd2..a1f95be31a66fa2e6968597ba812aed1675981f1 100644 (file)
@@ -57,7 +57,7 @@
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 37
+#define YY_FLEX_SUBMINOR_VERSION 35
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
@@ -207,7 +207,15 @@ typedef void* yyscan_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
 #define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -219,11 +227,6 @@ typedef void* yyscan_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
@@ -246,6 +249,11 @@ typedef size_t yy_size_t;
 
 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
 
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
 #ifndef YY_STRUCT_YY_BUFFER_STATE
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
@@ -263,7 +271,7 @@ struct yy_buffer_state
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
         */
-       yy_size_t yy_n_chars;
+       int yy_n_chars;
 
        /* Whether we "own" the buffer - i.e., we know we created it,
         * and can realloc() it to grow it, and should free() it to
@@ -342,7 +350,7 @@ static void core_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanne
 
 YY_BUFFER_STATE core_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
 YY_BUFFER_STATE core_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE core_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE core_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
 
 void *core_yyalloc (yy_size_t ,yyscan_t yyscanner );
 void *core_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -374,7 +382,7 @@ void core_yyfree (void * ,yyscan_t yyscanner );
 
 /* Begin user sect3 */
 
-#define core_yywrap(yyscanner) 1
+#define core_yywrap(n) 1
 #define YY_SKIP_YYWRAP
 
 typedef unsigned char YY_CHAR;
@@ -1081,7 +1089,7 @@ extern void core_yyset_column(int column_no, yyscan_t yyscanner);
  * Note that xcstart must appear before operator, as explained above!
  *  Also whitespace (comment) must appear before operator.
  */
-#line 1085 "scan.c"
+#line 1093 "scan.c"
 
 #define INITIAL 0
 #define xb 1
@@ -1122,8 +1130,8 @@ struct yyguts_t
     size_t yy_buffer_stack_max; /**< capacity of stack. */
     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
     char yy_hold_char;
-    yy_size_t yy_n_chars;
-    yy_size_t yyleng_r;
+    int yy_n_chars;
+    int yyleng_r;
     char *yy_c_buf_p;
     int yy_init;
     int yy_start;
@@ -1180,7 +1188,7 @@ FILE *core_yyget_out (yyscan_t yyscanner );
 
 void core_yyset_out  (FILE * out_str ,yyscan_t yyscanner );
 
-yy_size_t core_yyget_leng (yyscan_t yyscanner );
+int core_yyget_leng (yyscan_t yyscanner );
 
 char *core_yyget_text (yyscan_t yyscanner );
 
@@ -1188,10 +1196,6 @@ int core_yyget_lineno (yyscan_t yyscanner );
 
 void core_yyset_lineno (int line_number ,yyscan_t yyscanner );
 
-int core_yyget_column  (yyscan_t yyscanner );
-
-void core_yyset_column (int column_no ,yyscan_t yyscanner );
-
 YYSTYPE * core_yyget_lval (yyscan_t yyscanner );
 
 void core_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -1232,7 +1236,12 @@ static int input (yyscan_t yyscanner );
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
 #define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -1339,7 +1348,7 @@ YY_DECL
 #line 398 "scan.l"
 
 
-#line 1343 "scan.c"
+#line 1352 "scan.c"
 
     yylval = yylval_param;
 
@@ -2362,7 +2371,7 @@ YY_RULE_SETUP
 #line 1020 "scan.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
        YY_BREAK
-#line 2366 "scan.c"
+#line 2375 "scan.c"
 
        case YY_END_OF_BUFFER:
                {
@@ -2548,21 +2557,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
        else
                {
-                       yy_size_t num_to_read =
+                       int num_to_read =
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
                while ( num_to_read <= 0 )
                        { /* Not enough room in the buffer - grow it. */
 
                        /* just a shorter name for the current buffer */
-                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
 
                        int yy_c_buf_p_offset =
                                (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
 
                        if ( b->yy_is_our_buffer )
                                {
-                               yy_size_t new_size = b->yy_buf_size * 2;
+                               int new_size = b->yy_buf_size * 2;
 
                                if ( new_size <= 0 )
                                        b->yy_buf_size += b->yy_buf_size / 8;
@@ -2593,7 +2602,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       yyg->yy_n_chars, num_to_read );
+                       yyg->yy_n_chars, (size_t) num_to_read );
 
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
                }
@@ -2690,7 +2699,6 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
        yy_is_jam = (yy_current_state == 289);
 
-       (void)yyg;
        return yy_is_jam ? 0 : yy_current_state;
 }
 
@@ -2719,7 +2727,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                else
                        { /* need more input */
-                       yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+                       int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
                        ++yyg->yy_c_buf_p;
 
                        switch ( yy_get_next_buffer( yyscanner ) )
@@ -2999,7 +3007,7 @@ void core_yypop_buffer_state (yyscan_t yyscanner)
  */
 static void core_yyensure_buffer_stack (yyscan_t yyscanner)
 {
-       yy_size_t num_to_alloc;
+       int num_to_alloc;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
        if (!yyg->yy_buffer_stack) {
@@ -3097,7 +3105,7 @@ YY_BUFFER_STATE core_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
  * @param yyscanner The scanner object.
  * @return the newly allocated buffer state object.
  */
-YY_BUFFER_STATE core_yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE core_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
 {
        YY_BUFFER_STATE b;
        char *buf;
@@ -3212,7 +3220,7 @@ FILE *core_yyget_out  (yyscan_t yyscanner)
 /** Get the length of the current token.
  * @param yyscanner The scanner object.
  */
-yy_size_t core_yyget_leng  (yyscan_t yyscanner)
+int core_yyget_leng  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
     return yyleng;
@@ -3248,7 +3256,7 @@ void core_yyset_lineno (int  line_number , yyscan_t yyscanner)
 
         /* lineno is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           YY_FATAL_ERROR( "core_yyset_lineno called with no buffer" );
+           yy_fatal_error( "core_yyset_lineno called with no buffer" , yyscanner); 
     
     yylineno = line_number;
 }
@@ -3263,7 +3271,7 @@ void core_yyset_column (int  column_no , yyscan_t yyscanner)
 
         /* column is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           YY_FATAL_ERROR( "core_yyset_column called with no buffer" );
+           yy_fatal_error( "core_yyset_column called with no buffer" , yyscanner); 
     
     yycolumn = column_no;
 }
index 2b194eb927118619cdf4de92685b09874b1203cf..fc7d5c8d1aa30753d2efdae5977f52c64cf24022 100644 (file)
@@ -427,7 +427,7 @@ fail_over_on_backend_error = on
                                    # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
-search_primary_node_timeout = 10
+search_primary_node_timeout = 300
                                    # Timeout in seconds to search for the
                                    # primary node when a failover occurs.
                                    # 0 means no timeout, keep searching
index 9f016be98cce87177aab3a6dd0744f1e4549ff7e..6c6d867143bf7d6684e774d337773a7c51cab9e7 100644 (file)
@@ -426,7 +426,7 @@ fail_over_on_backend_error = on
                                    # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
-search_primary_node_timeout = 10
+search_primary_node_timeout = 300
                                    # Timeout in seconds to search for the
                                    # primary node when a failover occurs.
                                    # 0 means no timeout, keep searching
index 20ba0df3d3c711debfcb5c634c0ac9b0060f7b7a..01a7d88a47e9882cdc10a196a9c6253ba913eb1d 100644 (file)
@@ -425,7 +425,7 @@ fail_over_on_backend_error = on
                                    # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
-search_primary_node_timeout = 10
+search_primary_node_timeout = 300
                                    # Timeout in seconds to search for the
                                    # primary node when a failover occurs.
                                    # 0 means no timeout, keep searching
index 0ec1c55cec80218e6c1fb7c61b653a0eb4511839..a5ec7b6dec9a68a91693083967656097f1bda777 100644 (file)
@@ -426,7 +426,7 @@ fail_over_on_backend_error = on
                                    # If set to off, pgpool will report an
                                    # error and disconnect the session.
 
-search_primary_node_timeout = 10
+search_primary_node_timeout = 300
                                    # Timeout in seconds to search for the
                                    # primary node when a failover occurs.
                                    # 0 means no timeout, keep searching