Thu Mar 5 14:37:25 PST 2009
- Previous message: [Slony1-commit] slony1-engine/src/ducttape test_2_pgbench.in
- Next message: [Slony1-commit] slony1-engine/doc/adminguide firstdb.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slonik In directory main.slony.info:/tmp/cvs-serv5923/src/slonik Modified Files: Tag: REL_1_2_STABLE slonik.c Log Message: Fixed a problem where slonik cannot perform a failover if multiple origins fail at once. Jan Index: slonik.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slonik/slonik.c,v retrieving revision 1.67.2.17 retrieving revision 1.67.2.18 diff -C2 -d -r1.67.2.17 -r1.67.2.18 *** slonik.c 3 Jun 2008 18:54:42 -0000 1.67.2.17 --- slonik.c 5 Mar 2009 22:37:23 -0000 1.67.2.18 *************** *** 2642,2645 **** --- 2642,2655 ---- { nodeinfo[i].no_id = (int)strtol(PQgetvalue(res1, i, 0), NULL, 10); + + if (get_adminfo((SlonikStmt *) stmt, nodeinfo[i].no_id) == NULL) + { + printf("WARNING: no admin conninfo for node %d - node will not be considered\n", + nodeinfo[i].no_id); + nodeinfo[i].adminfo = NULL; + nodeinfo[i].has_slon = false; + continue; + } + nodeinfo[i].adminfo = get_active_adminfo((SlonikStmt *) stmt, nodeinfo[i].no_id); *************** *** 2759,2762 **** --- 2769,2775 ---- continue; + if (nodeinfo[i].adminfo == NULL) + continue; + if (db_exec_command((SlonikStmt *) stmt, nodeinfo[i].adminfo, &query) < 0) { *************** *** 2772,2775 **** --- 2785,2791 ---- for (i = 0; i < num_nodes; i++) { + if (nodeinfo[i].adminfo == NULL) + continue; + if (db_commit_xact((SlonikStmt *) stmt, nodeinfo[i].adminfo) < 0) { *************** *** 2838,2841 **** --- 2854,2860 ---- for (i = 0; i < num_nodes; i++) { + if (nodeinfo[i].adminfo == NULL) + continue; + res1 = db_exec_select((SlonikStmt *) stmt, nodeinfo[i].adminfo, &query); if (res1 != NULL) *************** *** 2906,2909 **** --- 2925,2931 ---- int64 ssy_seqno; + if (setinfo[i].subscribers[j]->adminfo == NULL) + continue; + res1 = db_exec_select((SlonikStmt *) stmt, setinfo[i].subscribers[j]->adminfo, &query); *************** *** 3033,3036 **** --- 3055,3061 ---- for (i = 0; i < num_nodes; i++) { + if (nodeinfo[i].adminfo == NULL) + continue; + if (db_commit_xact((SlonikStmt *) stmt, nodeinfo[i].adminfo) < 0) rc = -1;
- Previous message: [Slony1-commit] slony1-engine/src/ducttape test_2_pgbench.in
- Next message: [Slony1-commit] slony1-engine/doc/adminguide firstdb.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list