Thu Jul 29 12:04:25 PDT 2010
- Previous message: [Slony1-patches] bug 122
- Next message: [PATCH 3/4] When doing a fail node where the failed node is not a provider of the backup node we need to delete any subscribe entries that are used to forward data to the backup node. These will not be needed when the backup node becomes the new origin. Until that happens they get in the way of the FAILOVER_SET message that will be posted on the 'most ahead node' but iwth an origin of the old origin from getting to this node.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On processing the FAILOVER event we will mark the old origin as no inactive. RebuildListenEntries will now not remove paths that are dedundent if the (otherwise) preferred path flows through a disabled node. --- src/backend/slony1_funcs.sql | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/backend/slony1_funcs.sql b/src/backend/slony1_funcs.sql index 2e782a6..ce2edf5 100644 --- a/src/backend/slony1_funcs.sql +++ b/src/backend/slony1_funcs.sql @@ -1400,6 +1400,10 @@ begin where set_id = p_set_id; end if; + update @NAMESPACE at .sl_node + set no_active=false WHERE + no_id=p_failed_node; + -- Rewrite sl_listen table perform @NAMESPACE at .RebuildListenEntries(); @@ -4913,12 +4917,15 @@ begin -- If we use the event origin as a data provider for any -- set that originates on that very node, we are a direct -- subscriber to that origin and listen there only. - if exists (select true from @NAMESPACE at .sl_set, @NAMESPACE at .sl_subscribe + if exists (select true from @NAMESPACE at .sl_set, @NAMESPACE at .sl_subscribe , @NAMESPACE at .sl_node p where set_origin = v_row.origin and sub_set = set_id and sub_provider = v_row.origin and sub_receiver = v_row.receiver - and sub_active) + and sub_active + and p.no_active + and p.no_id=sub_provider + ) then delete from @NAMESPACE at .sl_listen where li_origin = v_row.origin -- 1.6.3.3 --------------020106060301020405000608 Content-Type: text/x-patch; name="0003-When-doing-a-fail-node-where-the-failed-node-is-not-.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0003-When-doing-a-fail-node-where-the-failed-node-is-not-.pa"; filename*1="tch"
- Previous message: [Slony1-patches] bug 122
- Next message: [PATCH 3/4] When doing a fail node where the failed node is not a provider of the backup node we need to delete any subscribe entries that are used to forward data to the backup node. These will not be needed when the backup node becomes the new origin. Until that happens they get in the way of the FAILOVER_SET message that will be posted on the 'most ahead node' but iwth an origin of the old origin from getting to this node.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-patches mailing list