pgpool2.git / summary / log / commit / refs

commit    6a734eb793fdee852bf6cbe62ad5dbb7ce8d8738
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Fri Dec 18 00:30:53 2009 +0000

    Fix crush with show pool_status when there many (more than 18) DB nodes.


pool_process_reporting.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pool_process_reporting.c b/pool_process_reporting.c index 34ab9c83c..f8b5f450e 100644 --- a/pool_process_reporting.c +++ b/pool_process_reporting.c @@ -52,9 +52,15 @@ void process_reporting(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend) char desc[POOLCONFIG_MAXDESCLEN+1]; } POOL_REPORT_STATUS; -#define MAXITEMS 128 +/* + * Report data buffer. + * 128 is the max number of configuration items. + * In addition, we need MAX_NUM_BACKENDS*4 + * for backend descriptions. + */ +#define MAXITEMS (128 + MAX_NUM_BACKENDS*4) - POOL_REPORT_STATUS status[MAXITEMS]; + static POOL_REPORT_STATUS status[MAXITEMS]; short nrows; int size; [parent: 5925b17f13e9]