[Pgcluster-general] Failover of PGReplicate

Josef.Bajada at go.com.mt Josef.Bajada at go.com.mt
Tue Jan 9 09:46:09 UTC 2007


Hi At,

I dont fully agree with your point 5. It works ok if all Cluster DBs are 
active when Replicator A fails. But if (in a dual node scenario or in a 
situation where more than 1 nodes fail) with the Replicator A, also 
ClusterDB A fails, after restarting Node A, ClusterDB A will connect to 
Replicator A and not B which is the master for the other ClusterDBs.

>From what I observed what happens is this (ClusterDB A and Replicator A 
are running on Node A, which suffers a powerfailure at Action 3 and gets 
restarted at Action 4).

Action   ClusterDB A      ClusterDB B           Status of      Status of
num      connect with     connects with         Replicator A   Replicator 
B
---------------------------------------------------------------------------
1       (start-up)        (start-up)            (start-up)     (start-up)
2       Replicator A      Replicator A          active         standby
3       (down)            Replicator B          (down)          active
4       (start-up)        Replicator B          (start-up)      active
5       Replicator A      Replicator B          (active?)        active

To simulate this I have just set up 2 nodes with ClusterDB and Replicator. 
Node A is the master. I do some insert queries on both systems and they 
are reflected on both systems. Then I kill all postmaster, pglb, 
pgreplicate process etc., to simulate a system failure. I do some queries 
on Node B (which uses Replicator B as in point 3). I then restart the 
replicator, and ClusterDB on Node A (in restore mode) and both databases 
seem to reflect each other. 

I then perform some insert queries on both nodes and discover that, 
queries performed on Node A are executed correctly on both nodes, however, 
queries performed on Node B are not reflected on Node A.

regards,
Josef





a.mitani at sra-europe.com 
Sent by: pgcluster-general-bounces at pgfoundry.org
08/01/2007 23:56
Please respond to
pgcluster-general at pgfoundry.org


To
pgcluster-general at pgfoundry.org
cc

Subject
Re: [Pgcluster-general] Failover of PGReplicate






Hi,

The status (active/standby) of replication server will be changed if
active server was stopped.

When "primary" is up again, it's status become "standby".
(action 4th-5th in following table)
If "secondary" is down, the "primary" status will be changed to "active".
(action 6th in following table)

Action   Cluster DBs      Status of      Status of
num      connect with     Replicator A   Replicator B
----------------------------------------------------------
1       (start-up)        (start-up)     (start-up)
2       Replicator A       active         standby
3       Replicator B      (down)          active
4       Replicator B      (start-up)      active
5       Replicator B       standby        active
6       Replicator A       active        (down)
7       Replicator A       active        (start-up)
8       Replicator A       active         standby

Does that answer you?

Regards,
-------------
At.Mitani


> Sorry, as I see it, the question hasn't been answered. He asked if the
> "secondary" node should detect that the "primary" is up again, and then
> restore the original behavior (i.e. root replication server getting
> active again in the whole replication schema).
>
> Regards,
> --
> Tom;
>
> a.mitani at sra-europe.com escribi�:
>> Hi,
>>
>> The replication server is used for queueing queries.
>> Therefore, all cluster db must connect same replication server.
>>
>> Replication server has not primary / secondary order.
>> It has just active / stand-by mode.
>>
>> Regards,
>> -------------------
>> At.Mitani
>>
>>
>>> Lets say I have 2 nodes, each running PGReplicate and ClusterDB. The
>>> node
>>> running the primary PGReplicate fails and the ClusterDB on the second
>>> node
>>> automatically fails over the PGReplicate of the first node. However,
>>> when
>>> I restart node1, the ClusterDB of node2 seems to remain connected to
>>> PGreplicate of node2, and thus any changes done on node 2 are no 
longer
>>> reflected on node1, and viceversa.
>>>
>>> Is ClusterDB supposed to realise that the primary replicator has been
>>> restored so that all clusterDBs access the same replicator?
>>>
>>> regards,
>>> Josef
>>>
>>> _______________________________________________
>>> Pgcluster-general mailing list
>>> Pgcluster-general at pgfoundry.org
>>> http://pgfoundry.org/mailman/listinfo/pgcluster-general
>>>
>>>
>>
>> _______________________________________________
>> Pgcluster-general mailing list
>> Pgcluster-general at pgfoundry.org
>> http://pgfoundry.org/mailman/listinfo/pgcluster-general
>>
>
> _______________________________________________
> Pgcluster-general mailing list
> Pgcluster-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgcluster-general
>

_______________________________________________
Pgcluster-general mailing list
Pgcluster-general at pgfoundry.org
http://pgfoundry.org/mailman/listinfo/pgcluster-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgcluster-general/attachments/20070109/65f283b2/attachment-0001.html 


More information about the Pgcluster-general mailing list