pgpool2.git / summary / log / commit / refs

commit    7a42a817329b386d33c2f9f4e53b95b858ca1eb4
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Thu Sep 14 02:04:08 2006 +0000

    Fix NUM_BACKENDS macro when operated in MASTER_SLAVE mode.
    See following message for more details.
    
    Subject: [Pgpool-general] pgpool-II master/slave mode, BackendError
    From: Jeff Davis <pgpool@j-davis.com>
    To: pgpool-general@pgfoundry.org
    Date: Tue, 12 Sep 2006 16:48:49 -0700


pool.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pool.h b/pool.h index 383106ff5..2d5190ae6 100644 --- a/pool.h +++ b/pool.h @@ -271,9 +271,14 @@ typedef struct { UNIT unit; } Interval; +#ifdef NOT_USED #define NUM_BACKENDS (in_load_balance? (selected_slot+1) : \ (((!REPLICATION && !PARALLEL_MODE)||master_slave_dml)? Req_info->master_node_id+1: \ pool_config->backend_desc->num_backends)) +#endif +#define NUM_BACKENDS (in_load_balance? (selected_slot+1) : \ + (((!REPLICATION && !PARALLEL_MODE) && !MASTER_SLAVE)? Req_info->master_node_id+1: \ + pool_config->backend_desc->num_backends)) #define BACKEND_INFO(backend_id) (pool_config->backend_desc->backend_info[(backend_id)]) #define LOAD_BALANCE_STATUS(backend_id) (pool_config->load_balance_status[(backend_id)]) #define VALID_BACKEND(backend_id) \ [parent: 9aa7d1fda6d2]