Wed Jun 17 14:37:40 PDT 2009
- Previous message: [Slony1-commit] slony1-engine/src/backend slony1_funcs.sql
- Next message: [Slony1-commit] slony1-engine/doc/adminguide adminscripts.sgml intro.sgml slonik_ref.sgml slonyupgrade.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon In directory main.slony.info:/tmp/cvs-serv2472/src/slon Modified Files: Tag: REL_2_0_STABLE remote_worker.c Log Message: Add in OMIT COPY option to SUBSCRIBE SET in support of upgrading from elder Slony-I versions. Index: remote_worker.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v retrieving revision 1.176 retrieving revision 1.176.2.1 diff -C2 -d -r1.176 -r1.176.2.1 *** remote_worker.c 29 Aug 2008 21:06:45 -0000 1.176 --- remote_worker.c 17 Jun 2009 21:37:38 -0000 1.176.2.1 *************** *** 1181,1184 **** --- 1181,1185 ---- int sub_receiver = (int) strtol(event->ev_data3, NULL, 10); char *sub_forward = event->ev_data4; + char *omit_copy = event->ev_data5; if (sub_receiver == rtcfg_nodeid) *************** *** 1186,1192 **** slon_appendquery(&query1, ! "select %s.subscribeSet_int(%d, %d, %d, '%q'); ", rtcfg_namespace, ! sub_set, sub_provider, sub_receiver, sub_forward); need_reloadListen = true; } --- 1187,1193 ---- slon_appendquery(&query1, ! "select %s.subscribeSet_int(%d, %d, %d, '%q', '%q'); ", rtcfg_namespace, ! sub_set, sub_provider, sub_receiver, sub_forward, omit_copy); need_reloadListen = true; } *************** *** 2430,2440 **** char seqbuf[64]; char *copydata = NULL; struct timeval tv_start; struct timeval tv_start2; struct timeval tv_now; - slon_log(SLON_INFO, "copy_set %d\n", set_id); gettimeofday(&tv_start, NULL); /* * Lookup the provider nodes conninfo --- 2431,2459 ---- char seqbuf[64]; char *copydata = NULL; + bool omit_copy = false; + char *v_omit_copy = event->ev_data5; struct timeval tv_start; struct timeval tv_start2; struct timeval tv_now; gettimeofday(&tv_start, NULL); + if (strcmp(v_omit_copy, "f") == 0) { + omit_copy = false; + } else { + if (strcmp(v_omit_copy, "t") == 0) { + omit_copy = true; + } else { + slon_log(SLON_ERROR, "copy_set %d - omit_copy not in (t,f)- [%s]\n", set_id, v_omit_copy); + } + } + slon_log(SLON_INFO, "copy_set %d - omit=%s - bool=%d\n", set_id, v_omit_copy, omit_copy); + + if (omit_copy) { + slon_log(SLON_INFO, "omit is TRUE\n"); + } else { + slon_log(SLON_INFO, "omit is FALSE\n"); + } + /* * Lookup the provider nodes conninfo *************** *** 2859,2862 **** --- 2878,2886 ---- * Begin a COPY from stdin for the table on the local DB */ + if (omit_copy) { + slon_log(SLON_CONFIG, "remoteWorkerThread_%d: " + "COPY of table %s suppressed due to OMIT COPY option\n", + node->no_id, tab_fqname); + } else { slon_log(SLON_CONFIG, "remoteWorkerThread_%d: " "Begin COPY of table %s\n", *************** *** 3148,3152 **** } } ! gettimeofday(&tv_now, NULL); slon_log(SLON_CONFIG, "remoteWorkerThread_%d: " --- 3172,3176 ---- } } ! } gettimeofday(&tv_now, NULL); slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
- Previous message: [Slony1-commit] slony1-engine/src/backend slony1_funcs.sql
- Next message: [Slony1-commit] slony1-engine/doc/adminguide adminscripts.sgml intro.sgml slonik_ref.sgml slonyupgrade.sgml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list