pgpool2.git / summary / log / commit / refs

commit    b07826aab5c9aaa7328f2ed96dd75cf0144b8d9c
Author:   Toshihiro Kitagawa <kitagawa at sraoss.co.jp>
Date:     Thu Nov 04 09:54:16 2010 +0000

    Fix bug in raw mode.
    
    The following change has not worked since pgpool-II 3.0.
    
    Subject: [Pgpool-committers] pgpool...
    Date: Sun, 16 May 2010 08:38:16 +0000 (UTC)
    
    - In row mode and if there's only one DB node, if a problem occurs
      with the DB node, it will be brought to down status. However if the
      DB node goes into good condition again, you can use the DB node
      without restarting pgpool.


pool.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pool.h b/pool.h index 95cdc71e2..1613044de 100644 --- a/pool.h +++ b/pool.h @@ -262,9 +262,10 @@ extern bool pool_is_node_to_be_sent_in_current_query(int node_id); extern int pool_virtual_master_db_node_id(void); #define VALID_BACKEND(backend_id) \ - (pool_is_node_to_be_sent_in_current_query((backend_id)) && \ - ((BACKEND_INFO((backend_id)).backend_status == CON_UP) || \ - (BACKEND_INFO((backend_id)).backend_status == CON_CONNECT_WAIT))) + ((RAW_MODE && (backend_id) == REAL_MASTER_NODE_ID) || \ + (pool_is_node_to_be_sent_in_current_query((backend_id)) && \ + ((BACKEND_INFO((backend_id)).backend_status == CON_UP) || \ + (BACKEND_INFO((backend_id)).backend_status == CON_CONNECT_WAIT)))) #define CONNECTION_SLOT(p, slot) ((p)->slots[(slot)]) #define CONNECTION(p, slot) (CONNECTION_SLOT(p, slot)->con) [parent: e727783e42e3]