Thu Nov 11 19:24:48 PST 2004
- Previous message: [Slony1-commit] By cbbrowne: Fixes to RebuildListenEntries() as it was adding sl_listen
- Next message: [Slony1-commit] By cbbrowne: Add FUNCTION generate_sync_event () - to try to add SYNCs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message: ----------- Add in debugging code, comment out actual execution of RebuildListenEntries(); Modified Files: -------------- slony1-engine/src/backend: slony1_funcs.sql (r1.38 -> r1.39) -------------- next part -------------- Index: slony1_funcs.sql =================================================================== RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v retrieving revision 1.38 retrieving revision 1.39 diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.38 -r1.39 --- src/backend/slony1_funcs.sql +++ src/backend/slony1_funcs.sql @@ -4519,18 +4519,26 @@ -- 1. Add listens pointed out by subscriptions - sl_listen -- @NAMESPACE at .storelisten(origin, provider, receiver) - perform @NAMESPACE at .storelisten(sub_provider, sub_provider, sub_receiver) + for v_row in select sub_provider, sub_receiver from @NAMESPACE at .sl_subscribe s where exists (select true from @NAMESPACE at .sl_path p where p.pa_server = s.sub_provider and - p.pa_client = s.sub_receiver); + p.pa_client = s.sub_receiver) + loop + -- raise notice ''Listen based on subscription: server % client %'', v_row.sub_provider, v_row.sub_receiver; + perform @NAMESPACE at .storelisten(v_row.sub_provider, v_row.sub_provider, v_row.sub_receiver); + end loop; -- 2. Add direct listens pointed out in sl_path - perform @NAMESPACE at .storelisten(pa_server, pa_server, pa_client) + for v_row in select pa_server, pa_client from @NAMESPACE at .sl_path path where not exists (select true from @NAMESPACE at .sl_listen listen where path.pa_server = listen.li_origin and - path.pa_client = listen.li_receiver); + path.pa_client = listen.li_receiver) + loop + -- raise notice ''Listen based on path: server % client %'', v_row.pa_server, v_row.pa_client; + perform @NAMESPACE at .storelisten(v_row.pa_server, v_row.pa_server, v_row.pa_client); + end loop; -- 3. Iterate until we cannot iterate any more... -- Add in indirect listens based on what is in sl_listen and sl_path @@ -4541,6 +4549,7 @@ from @NAMESPACE at .sl_path path, @NAMESPACE at .sl_listen listen where li_receiver = pa_server + and li_origin <> pa_client and not exists (select true from @NAMESPACE at .sl_listen listen2 where listen2.li_origin = listen.li_origin and listen2.li_receiver = path.pa_client) @@ -4549,6 +4558,7 @@ p.pa_client = path.pa_client ) loop + -- raise notice ''Listen based on listen/path - ORG: % PROV:% REC:%'', v_row.li_origin,v_row.pa_server,v_row.pa_client; perform @NAMESPACE at .storelisten(v_row.li_origin,v_row.pa_server,v_row.pa_client); v_done := ''f''; end loop;
- Previous message: [Slony1-commit] By cbbrowne: Fixes to RebuildListenEntries() as it was adding sl_listen
- Next message: [Slony1-commit] By cbbrowne: Add FUNCTION generate_sync_event () - to try to add SYNCs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list